muba-posting 6.0.21 → 6.0.23
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 +13 -15
- package/package.json +1 -1
package/Posting.js
CHANGED
|
@@ -351,6 +351,7 @@ export default class Posting extends React.Component {
|
|
|
351
351
|
if (params) {
|
|
352
352
|
await this.setState({ params: params });
|
|
353
353
|
}
|
|
354
|
+
await this.setState({ prevViews: [] })
|
|
354
355
|
break;
|
|
355
356
|
case Views.EDIT_SELECTOR:
|
|
356
357
|
await this.setState({ prevViews: [] })
|
|
@@ -360,12 +361,6 @@ export default class Posting extends React.Component {
|
|
|
360
361
|
if (this.props.changeView && Views.PAYMENT_ONLINE !== view) {
|
|
361
362
|
this.props.changeView(view);
|
|
362
363
|
}
|
|
363
|
-
|
|
364
|
-
if (Views.PAYMENT_ONLINE !== view) {
|
|
365
|
-
this.props.showTopBar();
|
|
366
|
-
} else {
|
|
367
|
-
this.props.hideTopBar();
|
|
368
|
-
}
|
|
369
364
|
}
|
|
370
365
|
|
|
371
366
|
goBack = async () => {
|
|
@@ -381,15 +376,15 @@ export default class Posting extends React.Component {
|
|
|
381
376
|
routes: routes
|
|
382
377
|
});
|
|
383
378
|
});
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
const prevViews = [...this.state.prevViews];
|
|
379
|
+
} else {
|
|
380
|
+
const prevViews = [...this.state.prevViews];
|
|
387
381
|
|
|
388
|
-
|
|
382
|
+
prevViews.shift();
|
|
389
383
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
384
|
+
const view = this.state.prevViews[0];
|
|
385
|
+
await this.setState({ prevViews: prevViews });
|
|
386
|
+
this._updateCurrentScreen(view);
|
|
387
|
+
}
|
|
393
388
|
}
|
|
394
389
|
}
|
|
395
390
|
|
|
@@ -413,7 +408,10 @@ export default class Posting extends React.Component {
|
|
|
413
408
|
|
|
414
409
|
const paymentOnlineActive = await this.props.request(this.props.context, PAYMENT_ONLINE_ACTIVE, { regionId: this.state.postingAd.region });
|
|
415
410
|
if (!this.state.businessId && paymentOnlineActive.value === 'true') {
|
|
416
|
-
this.
|
|
411
|
+
this.setState({
|
|
412
|
+
prevViews: [this.state.view, Views.PAYMENT_ONLINE],
|
|
413
|
+
view: Views.PAYMENT_ONLINE
|
|
414
|
+
})
|
|
417
415
|
}
|
|
418
416
|
}
|
|
419
417
|
this._hideLoading();
|
|
@@ -621,7 +619,7 @@ export default class Posting extends React.Component {
|
|
|
621
619
|
showTopBar={() => this.props.showTopBar()}
|
|
622
620
|
hideTopBar={() => this.props.hideTopBar()}
|
|
623
621
|
close={this.goBack}
|
|
624
|
-
goBack={() => this.
|
|
622
|
+
goBack={() => this.goBack()} />
|
|
625
623
|
:
|
|
626
624
|
null
|
|
627
625
|
}
|