muba-posting 4.2.2 → 4.2.3
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 +6 -0
- package/package.json +1 -1
package/Posting.js
CHANGED
|
@@ -35,6 +35,7 @@ const BUSINESS_PRODUCTS = { method: 'GET', url: '/controller/products/{key}/rema
|
|
|
35
35
|
const MAX_PICTURES = { method: 'GET', url: '/controller/posting/max-pictures' };
|
|
36
36
|
const COUNTRY_PHONE = { method: 'GET', url: '/controller/countries/{countryCode}/phones' };
|
|
37
37
|
const LOAD_PENDING_CREATED = { method: 'GET', url: '/controller/ads/pending-created/posting' };
|
|
38
|
+
const PAYMENT_ONLINE_ACTIVE = { method: 'GET', url: '/controller/payments-online/{countryCode}/active' };
|
|
38
39
|
|
|
39
40
|
export default class Posting extends React.Component {
|
|
40
41
|
constructor(props) {
|
|
@@ -400,6 +401,11 @@ export default class Posting extends React.Component {
|
|
|
400
401
|
} else {
|
|
401
402
|
await this.setState({ postingAd: { ...this.state.postingAd, adId: response.id } });
|
|
402
403
|
this._goToPage(Views.PREVIEW, null, response);
|
|
404
|
+
|
|
405
|
+
const paymentOnlineActive = await this.props.request(this, PAYMENT_ONLINE_ACTIVE, { regionId: this.state.postingAd.region });
|
|
406
|
+
if (!this.businessId && paymentOnlineActive.value === 'true') {
|
|
407
|
+
this._goToPage(Views.PAYMENT_ONLINE);
|
|
408
|
+
}
|
|
403
409
|
}
|
|
404
410
|
this._hideLoading();
|
|
405
411
|
|