muba-posting 6.0.26 → 6.0.28
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 +1 -1
- package/Publish6.js +6 -3
- package/package.json +1 -1
package/Posting.js
CHANGED
|
@@ -123,7 +123,7 @@ export default class Posting extends React.Component {
|
|
|
123
123
|
internet: false,
|
|
124
124
|
exteriorFacade: false,
|
|
125
125
|
animals: false,
|
|
126
|
-
|
|
126
|
+
phonesObject: this.props.phones ? Array.isArray(this.props.phones) ? this.props.phones : [this.props.phones] : [],
|
|
127
127
|
reference: null,
|
|
128
128
|
id: null,
|
|
129
129
|
languageId: currentLocale().toUpperCase(),
|
package/Publish6.js
CHANGED
|
@@ -61,6 +61,7 @@ export default class Publish6 extends React.Component {
|
|
|
61
61
|
delete ad.images;
|
|
62
62
|
delete ad.adTypeDetails;
|
|
63
63
|
delete ad.languages;
|
|
64
|
+
delete ad.phonesObject;
|
|
64
65
|
const responseJson = await this.props.request(this.props.context, GENERATE_TITLE_DESCRIPTION, ad);
|
|
65
66
|
|
|
66
67
|
if (responseJson?.httpStatus === 200) {
|
|
@@ -101,7 +102,7 @@ export default class Publish6 extends React.Component {
|
|
|
101
102
|
let validate = this.refs.phoneGroup.onSubmitValidate();
|
|
102
103
|
|
|
103
104
|
if (validate) {
|
|
104
|
-
const phones = this.props.postingAd.
|
|
105
|
+
const phones = this.props.postingAd.phonesObject.map(phone => phone.fullPhone).join(PHONE_SEPARATOR);
|
|
105
106
|
|
|
106
107
|
const body = {
|
|
107
108
|
adId: this.props.postingAd.id,
|
|
@@ -191,13 +192,15 @@ export default class Publish6 extends React.Component {
|
|
|
191
192
|
ref='phoneGroup'
|
|
192
193
|
inputStyle={commonStyles.input}
|
|
193
194
|
phoneBoxStyle={this.state.requiredPhoneError ? commonStyles.inputPhoneBoxError : commonStyles.inputPhoneBox}
|
|
194
|
-
value={this.props.postingAd.
|
|
195
|
+
value={this.props.postingAd.phonesObject}
|
|
195
196
|
country={this.props.country}
|
|
196
197
|
maxPhones={3}
|
|
197
198
|
required={true}
|
|
198
199
|
disabled={false}
|
|
199
200
|
returnKeyType={"next"}
|
|
200
|
-
|
|
201
|
+
context={this.props.context}
|
|
202
|
+
request={this.props.request}
|
|
203
|
+
onChange={(phones) => this.props.postingAd.phonesObject = phones} />
|
|
201
204
|
</View>
|
|
202
205
|
|
|
203
206
|
<View style={commonStyles.conseilBox}>
|