muba-posting 4.1.2 → 4.1.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 CHANGED
@@ -183,7 +183,7 @@ export default class Posting extends React.Component {
183
183
 
184
184
  loadData = async (canPublish) => {
185
185
  if (canPublish) {
186
- const resultJson = await this.props.request(this, COUNTRY_PHONE, { code: this.props.country });
186
+ const resultJson = await this.props.request(this, COUNTRY_PHONE);
187
187
  if (resultJson.status === 200) {
188
188
  this.setState({ countryPhone: resultJson.list[0].formattedPhone });
189
189
  }
package/Publish1.js CHANGED
@@ -37,7 +37,7 @@ export default class Publish1 extends React.Component {
37
37
  if (responseJson.status === 200) {
38
38
  this.jsonCategories = responseJson.list;
39
39
  this.props.postingAd.category = this.props.postingAd.category != null ? this.props.postingAd.category : this.jsonCategories[0].value;
40
- this.props.postingAd.subCategory = this.props.postingAd.subCategory != null ? this.props.postingAd.subCategory : this.jsonCategories[0].subCategoryList[0].value;
40
+ this.props.postingAd.subCategory = this.props.postingAd.subCategory != null ? this.props.postingAd.subCategory : this.jsonCategories[0].subList[0].value;
41
41
 
42
42
  await this.setState({
43
43
  transactionOptions: { elements: this.jsonCategories.map(jsonCategory => { return { label: jsonCategory.label, value: jsonCategory.value } }), selectedItem: this.props.postingAd.category },
@@ -68,7 +68,7 @@ export default class Publish1 extends React.Component {
68
68
  getSubCategories(category) {
69
69
  return this.jsonCategories?.find((categoryJson) =>
70
70
  categoryJson.value === category
71
- ).subCategoryList;
71
+ ).subList;
72
72
  }
73
73
 
74
74
  async changeCategory(category) {
@@ -108,7 +108,7 @@ export default class Publish1 extends React.Component {
108
108
  if (this.validateForm()) {
109
109
  for (var i = 0; i < this.state.typeBienOptions.elements.length; i++) {
110
110
  if (this.state.typeBienOptions.elements[i].value == this.state.typeBienOptions.selectedItem) {
111
- this.props.postingAd.subCategoryDetails = this.state.typeBienOptions.elements[i].detailList;
111
+ this.props.postingAd.subCategoryDetails = this.state.typeBienOptions.elements[i].subList;
112
112
  break;
113
113
  }
114
114
  }
package/Publish2.js CHANGED
@@ -62,7 +62,7 @@ export default class Publish2 extends React.Component {
62
62
  longitude: this.props.postingAd.longitude
63
63
  });
64
64
 
65
- if (responseJson.success) {
65
+ if (responseJson.status === 200) {
66
66
  if (responseJson.exactlyLocated) {
67
67
  this.props.postingAd.exactlyLocated = true;
68
68
  validateLocation = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-posting",
3
- "version": "4.1.2",
3
+ "version": "4.1.3",
4
4
  "description": "Posting",
5
5
  "main": "Posting.js",
6
6
  "scripts": {