muba-posting 4.1.5 → 4.1.8

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.
@@ -7,7 +7,7 @@ import Icon from '@expo/vector-icons/FontAwesome';
7
7
  import { strings } from 'muba-i18n';
8
8
  import commonStyles from './commonStyles';
9
9
 
10
- export const PROMOTE_AD = { method: 'PUT', url: '/controller/ad/{adId}/promote' };
10
+ export const PROMOTE_AD = { method: 'PUT', url: '/controller/ads/{adId}/promote' };
11
11
  const COUNTRY_PHONE = { method: 'GET', url: '/controller/countries/{countryCode}/phones' };
12
12
 
13
13
  export default class PopupSpendProduct extends React.Component {
package/Posting.js CHANGED
@@ -29,9 +29,9 @@ const FontAwesomeIcon = createIconSetFromFontello(fontelloConfig);
29
29
  const CREATE_AD = { method: 'POST', url: '/controller/ads' };
30
30
  const UPDATE_AD = { method: 'PUT', url: '/controller/ads/{adId}' };
31
31
  const AD = { method: 'GET', url: '/controller/ads/{adId}/posting' };
32
- const BUSINESS_ID = { method: 'GET', url: '/controller/users/{userId}/businessId' };
32
+ const BUSINESS_ID = { method: 'GET', url: '/controller/users/{userId}/business-id' };
33
33
  const BUSINESS_PRODUCTS = { method: 'GET', url: '/controller/products/{key}/remaining' };
34
- const MAX_PICTURES = { method: 'GET', url: '/controller/max-pictures' };
34
+ const MAX_PICTURES = { method: 'GET', url: '/controller/posting/max-pictures' };
35
35
  const COUNTRY_PHONE = { method: 'GET', url: '/controller/countries/{countryCode}/phones' };
36
36
 
37
37
  export default class Posting extends React.Component {
package/Publish6.js CHANGED
@@ -9,8 +9,8 @@ import { createIconSetFromFontello } from 'react-native-vector-icons';
9
9
  import fontelloConfig from './fonts/config.json';
10
10
  const FontAwesomeIcon = createIconSetFromFontello(fontelloConfig);
11
11
 
12
- const GENERATE_TITLE_DESCRIPTION = { method: 'POST', url: '/controller/generate-title-description' };
13
- const PHONE_REGISTERED = { method: 'GET', url: '/controller/phone-registered' };
12
+ const GENERATE_TITLE_DESCRIPTION = { method: 'GET', url: '/controller/posting/generate-title-description' };
13
+ const PHONE_REGISTERED = { method: 'GET', url: '/controller/posting/phone-registered' };
14
14
  const window = Dimensions.get('window');
15
15
  const PHONE_SEPARATOR = '###';
16
16
 
@@ -76,6 +76,8 @@ export default class Publish6 extends React.Component {
76
76
  this.props.showLoading();
77
77
  const ad = { ...this.props.postingAd };
78
78
  delete ad.images;
79
+ delete ad.subCategoryDetails;
80
+ delete ad.languages;
79
81
  const responseJson = await this.props.request(this.props.context, GENERATE_TITLE_DESCRIPTION, ad);
80
82
 
81
83
  if (responseJson?.httpStatus === 200) {
@@ -129,7 +131,7 @@ export default class Publish6 extends React.Component {
129
131
 
130
132
  const responseJson = await this.props.request(this.props.context, PHONE_REGISTERED, body);
131
133
  validate = responseJson.value === 'true' && validate;
132
- this.setState({ existingPhoneError: !phoneFree });
134
+ this.setState({ existingPhoneError: responseJson.value !== 'true' });
133
135
 
134
136
  this.languageItem.forEach(element => validate = element.validateLanguageItem() && validate);
135
137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-posting",
3
- "version": "4.1.5",
3
+ "version": "4.1.8",
4
4
  "description": "Posting",
5
5
  "main": "Posting.js",
6
6
  "scripts": {