muba-posting 8.0.14 → 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 +24 -8
- package/Publish2.js +6 -1
- package/Publish2b.js +6 -1
- package/package.json +1 -1
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
404
|
+
this.setState({ params: params });
|
|
404
405
|
}
|
|
405
|
-
|
|
406
|
+
this.setState({ prevViews: [] })
|
|
406
407
|
break;
|
|
407
408
|
case Views.EDIT_SELECTOR:
|
|
408
|
-
|
|
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 });
|
|
@@ -450,7 +458,14 @@ export default class Posting extends React.Component {
|
|
|
450
458
|
|
|
451
459
|
async _saveEditAd() {
|
|
452
460
|
this._showLoading();
|
|
453
|
-
|
|
461
|
+
let ad = { ...this.state.postingAd, id: { adId: this.state.postingAd.id } };
|
|
462
|
+
|
|
463
|
+
for (let photo of ad.images) {
|
|
464
|
+
if (photo.id == undefined) {
|
|
465
|
+
ad = { ...ad, newPictures: true };
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
454
469
|
if (this.state.originView === Views.EDIT_SELECTOR && Views.PUBLISH_4 !== this.state.view) {
|
|
455
470
|
delete ad.images;
|
|
456
471
|
}
|
|
@@ -570,7 +585,7 @@ export default class Posting extends React.Component {
|
|
|
570
585
|
<Publish2 postingAd={this.state.postingAd}
|
|
571
586
|
scroll={(ref) => this.scroll.scrollIntoView(ref)}
|
|
572
587
|
saveEditAd={() => this._saveEditAd()}
|
|
573
|
-
goToPage={(view) => this._goToPage(view)}
|
|
588
|
+
goToPage={(view, editingStepOne, params) => this._goToPage(view, editingStepOne, params)}
|
|
574
589
|
replacePage={(view) => this._updateCurrentScreen(view)}
|
|
575
590
|
baseUrl={this.props.baseUrl}
|
|
576
591
|
request={this.props.request}
|
|
@@ -589,7 +604,7 @@ export default class Posting extends React.Component {
|
|
|
589
604
|
<Publish2b postingAd={this.state.postingAd}
|
|
590
605
|
scroll={(ref) => this.scroll.scrollIntoView(ref)}
|
|
591
606
|
saveEditAd={() => this._saveEditAd()}
|
|
592
|
-
goToPage={(view) => this._goToPage(view)}
|
|
607
|
+
goToPage={(view, editingStepOne, params) => this._goToPage(view, editingStepOne, params)}
|
|
593
608
|
replacePage={(view) => this._updateCurrentScreen(view)}
|
|
594
609
|
request={this.props.request}
|
|
595
610
|
context={this.props.context}
|
|
@@ -701,6 +716,7 @@ export default class Posting extends React.Component {
|
|
|
701
716
|
context={this.props.context}
|
|
702
717
|
request={this.props.request}
|
|
703
718
|
adId={this.state.postingAd.id}
|
|
719
|
+
onlyShowCreateBusiness={this.state.onlyShowCreateBusiness}
|
|
704
720
|
country={this.props.country}
|
|
705
721
|
goToPrivacy={this.props.goToPrivacy}
|
|
706
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
|
-
|
|
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
|
-
|
|
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
|
}
|