muba-posting 4.1.18 → 4.1.19
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 +3 -3
- package/PostingEdit.js +3 -3
- package/Preview.js +4 -4
- package/Publish1.js +47 -47
- package/Publish3.js +33 -33
- package/Publish4.js +1 -1
- package/Publish5.js +69 -69
- package/Publish6.js +1 -1
- package/locales/ar.json +1 -1
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/locales/it.json +1 -1
- package/locales/nl.json +1 -1
- package/package.json +1 -1
package/Posting.js
CHANGED
|
@@ -64,9 +64,9 @@ export default class Posting extends React.Component {
|
|
|
64
64
|
businessId: this.props.businessId,
|
|
65
65
|
picturesUploaded: 0,
|
|
66
66
|
postingAd: {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
transaction: null,
|
|
68
|
+
adType: null,
|
|
69
|
+
adTypeDetails: [],
|
|
70
70
|
exactlyLocated: true,
|
|
71
71
|
latitude: null,
|
|
72
72
|
longitude: null,
|
package/PostingEdit.js
CHANGED
|
@@ -10,7 +10,7 @@ export default class PostingEdit extends React.Component {
|
|
|
10
10
|
super(props);
|
|
11
11
|
|
|
12
12
|
this.state = {
|
|
13
|
-
showFunctionalities: this.props.postingAd.
|
|
13
|
+
showFunctionalities: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "floorType" }).length > 0
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -22,7 +22,7 @@ export default class PostingEdit extends React.Component {
|
|
|
22
22
|
|
|
23
23
|
refresh() {
|
|
24
24
|
this.setState({
|
|
25
|
-
showFunctionalities: this.props.postingAd.
|
|
25
|
+
showFunctionalities: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "floorType" }).length > 0
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -47,7 +47,7 @@ export default class PostingEdit extends React.Component {
|
|
|
47
47
|
<View style={commonStyles.homeIcon} >
|
|
48
48
|
<Image source={require('./assets/images/type.png')} style={commonStyles.homeIconImage} />
|
|
49
49
|
</View>
|
|
50
|
-
<Text style={commonStyles.editIconText}>{strings('edit.
|
|
50
|
+
<Text style={commonStyles.editIconText}>{strings('edit.transaction')}</Text>
|
|
51
51
|
</TouchableOpacity>
|
|
52
52
|
<TouchableOpacity style={[commonStyles.col, commonStyles.col4, commonStyles.homeLinkBox]} activeOpacity={0.5} onPress={() => this.navigateToPublish2()}>
|
|
53
53
|
<View style={commonStyles.homeIcon} >
|
package/Preview.js
CHANGED
|
@@ -41,8 +41,8 @@ export default class Preview extends React.Component {
|
|
|
41
41
|
this.setState({
|
|
42
42
|
mainPicture: params.mainPicture,
|
|
43
43
|
location: params.location,
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
transaction: params.transactionName,
|
|
45
|
+
adType: params.adTypeName,
|
|
46
46
|
surface: params.surface,
|
|
47
47
|
showPrice: params.showPrice,
|
|
48
48
|
price: params.price,
|
|
@@ -161,11 +161,11 @@ export default class Preview extends React.Component {
|
|
|
161
161
|
</View>
|
|
162
162
|
<View style={commonStyles.row}>
|
|
163
163
|
<FontAwesomeIcon style={commonStyles.previewIcon} name="key" />
|
|
164
|
-
<Text style={commonStyles.previewInfoText}>{this.state.
|
|
164
|
+
<Text style={commonStyles.previewInfoText}>{this.state.transaction}</Text>
|
|
165
165
|
</View>
|
|
166
166
|
<View style={commonStyles.row}>
|
|
167
167
|
<FontAwesomeIcon style={commonStyles.previewIcon} name="tags" />
|
|
168
|
-
<Text style={commonStyles.previewInfoText}>{this.state.
|
|
168
|
+
<Text style={commonStyles.previewInfoText}>{this.state.adType}</Text>
|
|
169
169
|
</View>
|
|
170
170
|
</View>
|
|
171
171
|
<View style={commonStyles.col5}>
|
package/Publish1.js
CHANGED
|
@@ -6,20 +6,20 @@ import RadioButtonGroup from 'muba-radio-button-group';
|
|
|
6
6
|
import { Views } from './utils/Views';
|
|
7
7
|
const window = Dimensions.get('window');
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const GET_TRANSACTIONS = { method: 'GET', url: '/controller/transactions' };
|
|
10
10
|
|
|
11
11
|
export default class Publish1 extends React.Component {
|
|
12
12
|
constructor(props) {
|
|
13
13
|
super(props);
|
|
14
14
|
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
15
|
+
this.oldTransaction = this.props.postingAd.transaction;
|
|
16
|
+
this.oldAdType = this.props.postingAd.adType;
|
|
17
17
|
|
|
18
18
|
this.state = {
|
|
19
19
|
isLoading: false,
|
|
20
20
|
showTypeBienError: false,
|
|
21
|
-
transactionOptions: { elements: [], selectedItem: this.props.postingAd.
|
|
22
|
-
typeBienOptions: { elements: [], selectedItem: this.props.postingAd.
|
|
21
|
+
transactionOptions: { elements: [], selectedItem: this.props.postingAd.transaction },
|
|
22
|
+
typeBienOptions: { elements: [], selectedItem: this.props.postingAd.adType },
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -30,18 +30,18 @@ export default class Publish1 extends React.Component {
|
|
|
30
30
|
viewLoaded: true
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
const responseJson = await this.props.request(this.props.context,
|
|
33
|
+
const responseJson = await this.props.request(this.props.context, GET_TRANSACTIONS, {
|
|
34
34
|
userId: this.props.postingAd.userId
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
if (responseJson.httpStatus === 200) {
|
|
38
|
-
this.
|
|
39
|
-
this.props.postingAd.
|
|
40
|
-
this.props.postingAd.
|
|
38
|
+
this.jsonTransactions = responseJson.list;
|
|
39
|
+
this.props.postingAd.transaction = this.props.postingAd.transaction != null ? this.props.postingAd.transaction : this.jsonTransactions[0].value;
|
|
40
|
+
this.props.postingAd.adType = this.props.postingAd.adType != null ? this.props.postingAd.adType : this.jsonTransactions[0].subList[0].value;
|
|
41
41
|
|
|
42
42
|
await this.setState({
|
|
43
|
-
transactionOptions: { elements: this.
|
|
44
|
-
typeBienOptions: { elements: this.
|
|
43
|
+
transactionOptions: { elements: this.jsonTransactions.map(jsonTransaction => { return { label: jsonTransaction.label, value: jsonTransaction.value } }), selectedItem: this.props.postingAd.transaction },
|
|
44
|
+
typeBienOptions: { elements: this.getAdTypes(this.props.postingAd.transaction), selectedItem: this.props.postingAd.adType }
|
|
45
45
|
})
|
|
46
46
|
}
|
|
47
47
|
this.props.hideLoading();
|
|
@@ -53,62 +53,62 @@ export default class Publish1 extends React.Component {
|
|
|
53
53
|
this.setState({ minHeight: minHeight })
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
if (prevProps.postingAd.
|
|
57
|
-
|| prevProps.postingAd.
|
|
58
|
-
this.
|
|
59
|
-
this.
|
|
56
|
+
if (prevProps.postingAd.transaction !== this.props.postingAd.transaction
|
|
57
|
+
|| prevProps.postingAd.adType !== this.props.postingAd.adType) {
|
|
58
|
+
this.oldTransaction = this.props.postingAd.transaction;
|
|
59
|
+
this.oldAdType = this.props.postingAd.adType;
|
|
60
60
|
|
|
61
61
|
this.setState({
|
|
62
|
-
transactionOptions: { ...this.state.transactionOptions, selectedItem: this.props.postingAd.
|
|
63
|
-
typeBienOptions: { elements: this.
|
|
62
|
+
transactionOptions: { ...this.state.transactionOptions, selectedItem: this.props.postingAd.transaction },
|
|
63
|
+
typeBienOptions: { elements: this.getAdTypes(this.props.postingAd.transaction), selectedItem: this.props.postingAd.adType }
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
return this.
|
|
70
|
-
|
|
68
|
+
getAdTypes(transaction) {
|
|
69
|
+
return this.jsonTransactions?.find((transactionJson) =>
|
|
70
|
+
transactionJson.value === transaction
|
|
71
71
|
).subList;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
async
|
|
75
|
-
this.props.postingAd.
|
|
76
|
-
this.props.postingAd.
|
|
74
|
+
async changeTransaction(transaction) {
|
|
75
|
+
this.props.postingAd.transaction = transaction;
|
|
76
|
+
this.props.postingAd.adType = undefined;
|
|
77
77
|
|
|
78
|
-
const
|
|
79
|
-
let
|
|
78
|
+
const adTypes = this.getAdTypes(transaction);
|
|
79
|
+
let currentAdType = this.state.typeBienOptions.selectedItem;
|
|
80
80
|
|
|
81
|
-
if (
|
|
82
|
-
if (
|
|
83
|
-
|
|
84
|
-
} else if (
|
|
85
|
-
|
|
86
|
-
} else if (
|
|
87
|
-
|
|
81
|
+
if (currentAdType != null) {
|
|
82
|
+
if (currentAdType.includes('sale')) {
|
|
83
|
+
currentAdType = currentAdType.substring(0, currentAdType.indexOf('sale'));
|
|
84
|
+
} else if (currentAdType.includes('rent')) {
|
|
85
|
+
currentAdType = currentAdType.substring(0, currentAdType.indexOf('rent'));
|
|
86
|
+
} else if (currentAdType.includes('vacational')) {
|
|
87
|
+
currentAdType = currentAdType.substring(0, currentAdType.indexOf('vacational'));
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
currentAdType = adTypes.find((element) => { return element.value.startsWith(currentAdType) });
|
|
91
91
|
|
|
92
|
-
if (
|
|
93
|
-
|
|
92
|
+
if (currentAdType === undefined) {
|
|
93
|
+
currentAdType = this.getAdTypes(transaction)[0].value;
|
|
94
94
|
} else {
|
|
95
|
-
|
|
95
|
+
currentAdType = currentAdType.value;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
this.props.postingAd.
|
|
98
|
+
this.props.postingAd.adType = currentAdType;
|
|
99
99
|
}
|
|
100
|
-
await this.setState({ typeBienOptions: { elements: this.
|
|
100
|
+
await this.setState({ typeBienOptions: { elements: this.getAdTypes(transaction), selectedItem: this.props.postingAd.adType } });
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
this.props.postingAd.
|
|
103
|
+
changeAdType(value) {
|
|
104
|
+
this.props.postingAd.adType = value;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
async nextStep() {
|
|
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.
|
|
111
|
+
this.props.postingAd.adTypeDetails = this.state.typeBienOptions.elements[i].subList;
|
|
112
112
|
break;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -120,7 +120,7 @@ export default class Publish1 extends React.Component {
|
|
|
120
120
|
this.props.goToPage(Views.PUBLISH_2_B);
|
|
121
121
|
}
|
|
122
122
|
} else {
|
|
123
|
-
if (this.
|
|
123
|
+
if (this.oldTransaction != this.state.transactionOptions.selectedItem || this.oldAdType != this.state.typeBienOptions.selectedItem) {
|
|
124
124
|
this.props.goToPage(Views.PUBLISH_3, true);
|
|
125
125
|
} else {
|
|
126
126
|
this.props.saveEditAd();
|
|
@@ -130,7 +130,7 @@ export default class Publish1 extends React.Component {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
validateForm() {
|
|
133
|
-
return this.
|
|
133
|
+
return this.radioButtonAdType.onSubmitValidate();
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
render() {
|
|
@@ -149,7 +149,7 @@ export default class Publish1 extends React.Component {
|
|
|
149
149
|
titleStyle={commonStyles.progressbarField}
|
|
150
150
|
radioButtonStyle={commonStyles.radioButton}
|
|
151
151
|
options={this.state.transactionOptions}
|
|
152
|
-
onClick={(value) => this.
|
|
152
|
+
onClick={(value) => this.changeTransaction(value)} />
|
|
153
153
|
|
|
154
154
|
<RadioButtonGroup
|
|
155
155
|
style={commonStyles.progressbarFieldContainer}
|
|
@@ -159,14 +159,14 @@ export default class Publish1 extends React.Component {
|
|
|
159
159
|
titleStyle={commonStyles.progressbarField}
|
|
160
160
|
radioButtonStyle={commonStyles.radioButton}
|
|
161
161
|
options={this.state.typeBienOptions}
|
|
162
|
-
onClick={(value) => this.
|
|
163
|
-
ref={(element) => this.
|
|
162
|
+
onClick={(value) => this.changeAdType(value)}
|
|
163
|
+
ref={(element) => this.radioButtonAdType = element} />
|
|
164
164
|
</View>
|
|
165
165
|
</View>
|
|
166
166
|
<View style={commonStyles.buttomButton}>
|
|
167
167
|
<TouchableHighlight style={commonStyles.actionButton} underlayColor="#ff5d00" onPress={() => this.nextStep()}>
|
|
168
168
|
<Text style={commonStyles.actionButtonText}>
|
|
169
|
-
{this.props.postingAd.id == null || this.props.fullPosting || this.
|
|
169
|
+
{this.props.postingAd.id == null || this.props.fullPosting || this.oldTransaction != this.state.transactionOptions.selectedItem || this.oldAdType != this.state.typeBienOptions.selectedItem ?
|
|
170
170
|
strings('setup.next').toUpperCase()
|
|
171
171
|
:
|
|
172
172
|
strings('setup.enregistrer').toUpperCase()}
|
package/Publish3.js
CHANGED
|
@@ -15,19 +15,19 @@ export default class Publish3 extends React.Component {
|
|
|
15
15
|
constructor(props) {
|
|
16
16
|
super(props);
|
|
17
17
|
|
|
18
|
-
if (this.props.postingAd.pricePeriod === -1 && this.props.postingAd.
|
|
18
|
+
if (this.props.postingAd.pricePeriod === -1 && this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "pricePeriod" }).length > 0) {
|
|
19
19
|
this.props.postingAd.pricePeriod = 'MONTLY';
|
|
20
20
|
}
|
|
21
|
-
const pricePeriod = this.props.postingAd.
|
|
21
|
+
const pricePeriod = this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "pricePeriod" });
|
|
22
22
|
|
|
23
23
|
this.state = {
|
|
24
|
-
area: this.props.postingAd.
|
|
25
|
-
condition: this.props.postingAd.
|
|
26
|
-
pieces: this.props.postingAd.
|
|
27
|
-
rooms: this.props.postingAd.
|
|
28
|
-
baths: this.props.postingAd.
|
|
29
|
-
pax: this.props.postingAd.
|
|
30
|
-
minNights: this.props.postingAd.
|
|
24
|
+
area: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "surface" }),
|
|
25
|
+
condition: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "conservation" }),
|
|
26
|
+
pieces: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "pieces" }),
|
|
27
|
+
rooms: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "rooms" }),
|
|
28
|
+
baths: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "baths" }),
|
|
29
|
+
pax: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "pax" }),
|
|
30
|
+
minNights: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "minNights" }),
|
|
31
31
|
pricePeriod: pricePeriod,
|
|
32
32
|
conditionOptions: {
|
|
33
33
|
elements: [
|
|
@@ -54,7 +54,7 @@ export default class Publish3 extends React.Component {
|
|
|
54
54
|
},
|
|
55
55
|
surface: this.props.postingAd.surface,
|
|
56
56
|
price: this.props.postingAd.price,
|
|
57
|
-
|
|
57
|
+
adType: this.props.postingAd.adType,
|
|
58
58
|
requiredErrorCondition: false,
|
|
59
59
|
viewLoaded: false
|
|
60
60
|
};
|
|
@@ -88,41 +88,41 @@ export default class Publish3 extends React.Component {
|
|
|
88
88
|
this.setState({ minHeight: minHeight })
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
if (prevProps.postingAd.
|
|
91
|
+
if (prevProps.postingAd.adType !== this.props.postingAd.adType
|
|
92
92
|
|| prevProps.postingAd.surface !== this.props.postingAd.surface
|
|
93
93
|
|| prevProps.postingAd.price !== this.props.postingAd.price
|
|
94
94
|
|| prevProps.postingAd.condition !== this.props.postingAd.condition) {
|
|
95
95
|
this.setState({
|
|
96
|
-
|
|
96
|
+
adType: this.props.postingAd.adType,
|
|
97
97
|
surface: this.props.postingAd.surface,
|
|
98
98
|
price: this.props.postingAd.price,
|
|
99
99
|
conditionOptions: { ...this.state.conditionOptions, selectedItem: this.props.postingAd.condition },
|
|
100
|
-
area: this.props.postingAd.
|
|
101
|
-
condition: this.props.postingAd.
|
|
102
|
-
pieces: this.props.postingAd.
|
|
103
|
-
rooms: this.props.postingAd.
|
|
104
|
-
baths: this.props.postingAd.
|
|
105
|
-
pax: this.props.postingAd.
|
|
106
|
-
minNights: this.props.postingAd.
|
|
107
|
-
pricePeriod: this.props.postingAd.
|
|
100
|
+
area: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "surface" }),
|
|
101
|
+
condition: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "conservation" }),
|
|
102
|
+
pieces: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "pieces" }),
|
|
103
|
+
rooms: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "rooms" }),
|
|
104
|
+
baths: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "baths" }),
|
|
105
|
+
pax: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "pax" }),
|
|
106
|
+
minNights: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "minNights" }),
|
|
107
|
+
pricePeriod: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "pricePeriod" })
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
async refreshData() {
|
|
113
|
-
if (this.state.
|
|
114
|
-
const pricePeriod = this.props.postingAd.
|
|
113
|
+
if (this.state.adType != this.props.postingAd.adType) {
|
|
114
|
+
const pricePeriod = this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "pricePeriod" });
|
|
115
115
|
|
|
116
116
|
await this.setState({
|
|
117
|
-
area: this.props.postingAd.
|
|
118
|
-
condition: this.props.postingAd.
|
|
119
|
-
pieces: this.props.postingAd.
|
|
120
|
-
rooms: this.props.postingAd.
|
|
121
|
-
baths: this.props.postingAd.
|
|
122
|
-
pax: this.props.postingAd.
|
|
123
|
-
minNights: this.props.postingAd.
|
|
124
|
-
pricePeriod: this.props.postingAd.
|
|
125
|
-
|
|
117
|
+
area: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "surface" }),
|
|
118
|
+
condition: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "conservation" }),
|
|
119
|
+
pieces: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "pieces" }),
|
|
120
|
+
rooms: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "rooms" }),
|
|
121
|
+
baths: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "baths" }),
|
|
122
|
+
pax: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "pax" }),
|
|
123
|
+
minNights: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "minNights" }),
|
|
124
|
+
pricePeriod: this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "pricePeriod" }),
|
|
125
|
+
adType: this.props.postingAd.adType,
|
|
126
126
|
pricePeriodOptions: {
|
|
127
127
|
elements: [{ section: true, value: null, label: pricePeriod[0]?.label }, ...this.state.pricePeriodOptions.elements.slice(1)],
|
|
128
128
|
selectedItem: this.props.postingAd.pricePeriod
|
|
@@ -160,7 +160,7 @@ export default class Publish3 extends React.Component {
|
|
|
160
160
|
if (this.props.postingAd.id == null || this.props.fullPosting) {
|
|
161
161
|
this.props.goToPage(Views.PUBLISH_4);
|
|
162
162
|
} else {
|
|
163
|
-
if (this.props.editingStepOne && this.props.postingAd.
|
|
163
|
+
if (this.props.editingStepOne && this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "floorType" }).length > 0) {
|
|
164
164
|
this.props.goToPage(Views.PUBLISH_5, true);
|
|
165
165
|
} else {
|
|
166
166
|
this.props.saveEditAd();
|
|
@@ -385,7 +385,7 @@ export default class Publish3 extends React.Component {
|
|
|
385
385
|
<View style={commonStyles.buttomButton}>
|
|
386
386
|
<TouchableHighlight style={commonStyles.actionButton} underlayColor="#ff5d00" onPress={() => this.nextStep()}>
|
|
387
387
|
<Text style={commonStyles.actionButtonText}>
|
|
388
|
-
{this.props.postingAd.id == null || this.props.fullPosting || (this.props.editingStepOne && this.props.postingAd.
|
|
388
|
+
{this.props.postingAd.id == null || this.props.fullPosting || (this.props.editingStepOne && this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "floorType" }).length > 0) ?
|
|
389
389
|
strings('setup.next').toUpperCase()
|
|
390
390
|
:
|
|
391
391
|
strings('setup.enregistrer').toUpperCase()}
|
package/Publish4.js
CHANGED
|
@@ -148,7 +148,7 @@ export default class Publish4 extends React.Component {
|
|
|
148
148
|
this.props.postingAd.images = this.state.images;
|
|
149
149
|
this.setState({ showErrorNoSelectedImages: false });
|
|
150
150
|
if (this.props.postingAd.id == null || this.props.fullPosting) {
|
|
151
|
-
if (this.props.postingAd.
|
|
151
|
+
if (this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "floorType" }).length > 0) {
|
|
152
152
|
this.props.goToPage(Views.PUBLISH_5);
|
|
153
153
|
} else {
|
|
154
154
|
this.props.goToPage(Views.PUBLISH_6);
|
package/Publish5.js
CHANGED
|
@@ -10,10 +10,10 @@ export default class Publish5 extends React.Component {
|
|
|
10
10
|
constructor(props) {
|
|
11
11
|
super(props);
|
|
12
12
|
|
|
13
|
-
const age = this.props.postingAd.
|
|
14
|
-
const floorType = this.props.postingAd.
|
|
15
|
-
const floorNumber = this.props.postingAd.
|
|
16
|
-
const orientationType = this.props.postingAd.
|
|
13
|
+
const age = this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "age" });
|
|
14
|
+
const floorType = this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "floorType" });
|
|
15
|
+
const floorNumber = this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "floorNumber" });
|
|
16
|
+
const orientationType = this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "orientation" });
|
|
17
17
|
|
|
18
18
|
this.state = {
|
|
19
19
|
isLoading: false,
|
|
@@ -75,8 +75,8 @@ export default class Publish5 extends React.Component {
|
|
|
75
75
|
{ label: '20', value: '20' },
|
|
76
76
|
],
|
|
77
77
|
selectedItem: this.props.postingAd.floorNumber,
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
adType: this.props.postingAd.adType,
|
|
79
|
+
adTypeDetails: this.props.postingAd.adTypeDetails,
|
|
80
80
|
viewLoaded: false
|
|
81
81
|
},
|
|
82
82
|
orientationOptions: {
|
|
@@ -108,19 +108,19 @@ export default class Publish5 extends React.Component {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
async refreshData() {
|
|
111
|
-
if (this.state.
|
|
112
|
-
const age = this.props.postingAd.
|
|
113
|
-
const floorType = this.props.postingAd.
|
|
114
|
-
const floorNumber = this.props.postingAd.
|
|
115
|
-
const orientationType = this.props.postingAd.
|
|
111
|
+
if (this.state.adType != this.props.postingAd.adType) {
|
|
112
|
+
const age = this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "age" });
|
|
113
|
+
const floorType = this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "floorType" });
|
|
114
|
+
const floorNumber = this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "floorNumber" });
|
|
115
|
+
const orientationType = this.props.postingAd.adTypeDetails.filter(function (detail) { return detail.value == "orientation" });
|
|
116
116
|
|
|
117
117
|
await this.setState({
|
|
118
118
|
age: age,
|
|
119
119
|
floorType: floorType,
|
|
120
120
|
floorNumber: floorNumber,
|
|
121
121
|
orientation: orientationType,
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
adType: this.props.postingAd.adType,
|
|
123
|
+
adTypeDetails: this.props.postingAd.adTypeDetails,
|
|
124
124
|
ageOptions: {
|
|
125
125
|
elements: [{ section: true, value: null, label: age[0]?.label }, ...this.state.ageOptions.elements.slice(1)],
|
|
126
126
|
selectedItem: this.props.postingAd.age
|
|
@@ -259,8 +259,8 @@ export default class Publish5 extends React.Component {
|
|
|
259
259
|
<IconFeatures
|
|
260
260
|
iconSource={require('./assets/images/garden.png')}
|
|
261
261
|
iconHoverSource={require('./assets/images/garden-hover.png')}
|
|
262
|
-
iconText={this.state.
|
|
263
|
-
visible={this.state.
|
|
262
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "garden" })[0]?.label}
|
|
263
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "garden" }).length > 0}
|
|
264
264
|
selected={this.props.postingAd.garden}
|
|
265
265
|
onPress={(value) => this.props.postingAd.garden = value}
|
|
266
266
|
ref={(element) => this.inputGarden = element} />
|
|
@@ -268,8 +268,8 @@ export default class Publish5 extends React.Component {
|
|
|
268
268
|
<IconFeatures
|
|
269
269
|
iconSource={require('./assets/images/terrace.png')}
|
|
270
270
|
iconHoverSource={require('./assets/images/terrace-hover.png')}
|
|
271
|
-
iconText={this.state.
|
|
272
|
-
visible={this.state.
|
|
271
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "terrace" })[0]?.label}
|
|
272
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "terrace" }).length > 0}
|
|
273
273
|
selected={this.props.postingAd.terrace}
|
|
274
274
|
onPress={(value) => this.props.postingAd.terrace = value}
|
|
275
275
|
ref={(element) => this.inputTerrace = element} />
|
|
@@ -277,8 +277,8 @@ export default class Publish5 extends React.Component {
|
|
|
277
277
|
<IconFeatures
|
|
278
278
|
iconSource={require('./assets/images/garage.png')}
|
|
279
279
|
iconHoverSource={require('./assets/images/garage-hover.png')}
|
|
280
|
-
iconText={this.state.
|
|
281
|
-
visible={this.state.
|
|
280
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "garage" })[0]?.label}
|
|
281
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "garage" }).length > 0}
|
|
282
282
|
selected={this.props.postingAd.garage}
|
|
283
283
|
onPress={(value) => this.props.postingAd.garage = value}
|
|
284
284
|
ref={(element) => this.inputGarage = element} />
|
|
@@ -286,8 +286,8 @@ export default class Publish5 extends React.Component {
|
|
|
286
286
|
<IconFeatures
|
|
287
287
|
iconSource={require('./assets/images/elevator.png')}
|
|
288
288
|
iconHoverSource={require('./assets/images/elevator-hover.png')}
|
|
289
|
-
iconText={this.state.
|
|
290
|
-
visible={this.state.
|
|
289
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "elevator" })[0]?.label}
|
|
290
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "elevator" }).length > 0}
|
|
291
291
|
selected={this.props.postingAd.elevator}
|
|
292
292
|
onPress={(value) => this.props.postingAd.elevator = value}
|
|
293
293
|
ref={(element) => this.inputElevator = element} />
|
|
@@ -295,8 +295,8 @@ export default class Publish5 extends React.Component {
|
|
|
295
295
|
<IconFeatures
|
|
296
296
|
iconSource={require('./assets/images/sea.png')}
|
|
297
297
|
iconHoverSource={require('./assets/images/sea-hover.png')}
|
|
298
|
-
iconText={this.state.
|
|
299
|
-
visible={this.state.
|
|
298
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "seaViews" })[0]?.label}
|
|
299
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "seaViews" }).length > 0}
|
|
300
300
|
selected={this.props.postingAd.seaViews}
|
|
301
301
|
onPress={(value) => this.props.postingAd.seaViews = value}
|
|
302
302
|
ref={(element) => this.inputSeaViews = element} />
|
|
@@ -304,8 +304,8 @@ export default class Publish5 extends React.Component {
|
|
|
304
304
|
<IconFeatures
|
|
305
305
|
iconSource={require('./assets/images/views.png')}
|
|
306
306
|
iconHoverSource={require('./assets/images/views-hover.png')}
|
|
307
|
-
iconText={this.state.
|
|
308
|
-
visible={this.state.
|
|
307
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "mountainsViews" })[0]?.label}
|
|
308
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "mountainsViews" }).length > 0}
|
|
309
309
|
selected={this.props.postingAd.mountainsViews}
|
|
310
310
|
onPress={(value) => this.props.postingAd.mountainsViews = value}
|
|
311
311
|
ref={(element) => this.inputMountainViews = element} />
|
|
@@ -313,8 +313,8 @@ export default class Publish5 extends React.Component {
|
|
|
313
313
|
<IconFeatures
|
|
314
314
|
iconSource={require('./assets/images/pool.png')}
|
|
315
315
|
iconHoverSource={require('./assets/images/pool-hover.png')}
|
|
316
|
-
iconText={this.state.
|
|
317
|
-
visible={this.state.
|
|
316
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "pool" })[0]?.label}
|
|
317
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "pool" }).length > 0}
|
|
318
318
|
selected={this.props.postingAd.pool}
|
|
319
319
|
onPress={(value) => this.props.postingAd.pool = value}
|
|
320
320
|
ref={(element) => this.inputPool = element} />
|
|
@@ -322,8 +322,8 @@ export default class Publish5 extends React.Component {
|
|
|
322
322
|
<IconFeatures
|
|
323
323
|
iconSource={require('./assets/images/concierge.png')}
|
|
324
324
|
iconHoverSource={require('./assets/images/concierge-hover.png')}
|
|
325
|
-
iconText={this.state.
|
|
326
|
-
visible={this.state.
|
|
325
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "doorman" })[0]?.label}
|
|
326
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "doorman" }).length > 0}
|
|
327
327
|
selected={this.props.postingAd.doorman}
|
|
328
328
|
onPress={(value) => this.props.postingAd.doorman = value}
|
|
329
329
|
ref={(element) => this.inputConcierge = element} />
|
|
@@ -331,8 +331,8 @@ export default class Publish5 extends React.Component {
|
|
|
331
331
|
<IconFeatures
|
|
332
332
|
iconSource={require('./assets/images/storage.png')}
|
|
333
333
|
iconHoverSource={require('./assets/images/storage-hover.png')}
|
|
334
|
-
iconText={this.state.
|
|
335
|
-
visible={this.state.
|
|
334
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "storageRoom" })[0]?.label}
|
|
335
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "storageRoom" }).length > 0}
|
|
336
336
|
selected={this.props.postingAd.storageRoom}
|
|
337
337
|
onPress={(value) => this.props.postingAd.storageRoom = value}
|
|
338
338
|
ref={(element) => this.inputStorageRoom = element} />
|
|
@@ -340,16 +340,16 @@ export default class Publish5 extends React.Component {
|
|
|
340
340
|
<IconFeatures
|
|
341
341
|
iconSource={require('./assets/images/furnish.png')}
|
|
342
342
|
iconHoverSource={require('./assets/images/furnish-hover.png')}
|
|
343
|
-
iconText={this.state.
|
|
344
|
-
visible={this.state.
|
|
343
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "furnished" })[0]?.label}
|
|
344
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "furnished" }).length > 0}
|
|
345
345
|
selected={this.props.postingAd.furnished}
|
|
346
346
|
onPress={(value) => this.props.postingAd.furnished = value}
|
|
347
347
|
ref={(element) => this.inputFurnished = element} />
|
|
348
348
|
<IconFeatures
|
|
349
349
|
iconSource={require('./assets/images/exteriorFacade.png')}
|
|
350
350
|
iconHoverSource={require('./assets/images/exteriorFacade-hover.png')}
|
|
351
|
-
iconText={this.state.
|
|
352
|
-
visible={this.state.
|
|
351
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "exteriorFacade" })[0]?.label}
|
|
352
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "exteriorFacade" }).length > 0}
|
|
353
353
|
selected={this.props.postingAd.exteriorFacade}
|
|
354
354
|
onPress={(value) => this.props.postingAd.exteriorFacade = value}
|
|
355
355
|
ref={(element) => this.inputExteriorFacade = element} />
|
|
@@ -361,8 +361,8 @@ export default class Publish5 extends React.Component {
|
|
|
361
361
|
<IconFeatures
|
|
362
362
|
iconSource={require('./assets/images/moroccan.png')}
|
|
363
363
|
iconHoverSource={require('./assets/images/moroccan-hover.png')}
|
|
364
|
-
iconText={this.state.
|
|
365
|
-
visible={this.state.
|
|
364
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "moroccanLounge" })[0]?.label}
|
|
365
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "moroccanLounge" }).length > 0}
|
|
366
366
|
selected={this.props.postingAd.moroccanLounge}
|
|
367
367
|
onPress={(value) => this.props.postingAd.moroccanLounge = value}
|
|
368
368
|
ref={(element) => this.inputSalonMarocain = element} />
|
|
@@ -370,8 +370,8 @@ export default class Publish5 extends React.Component {
|
|
|
370
370
|
<IconFeatures
|
|
371
371
|
iconSource={require('./assets/images/diningroom.png')}
|
|
372
372
|
iconHoverSource={require('./assets/images/diningroom-hover.png')}
|
|
373
|
-
iconText={this.state.
|
|
374
|
-
visible={this.state.
|
|
373
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "europeanLounge" })[0]?.label}
|
|
374
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "europeanLounge" }).length > 0}
|
|
375
375
|
selected={this.props.postingAd.europeanLounge}
|
|
376
376
|
onPress={(value) => this.props.postingAd.europeanLounge = value}
|
|
377
377
|
ref={(element) => this.inputSalonEuropean = element} />
|
|
@@ -379,8 +379,8 @@ export default class Publish5 extends React.Component {
|
|
|
379
379
|
<IconFeatures
|
|
380
380
|
iconSource={require('./assets/images/satellite.png')}
|
|
381
381
|
iconHoverSource={require('./assets/images/satellite-hover.png')}
|
|
382
|
-
iconText={this.state.
|
|
383
|
-
visible={this.state.
|
|
382
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "satellite" })[0]?.label}
|
|
383
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "satellite" }).length > 0}
|
|
384
384
|
selected={this.props.postingAd.satellite}
|
|
385
385
|
onPress={(value) => this.props.postingAd.satellite = value}
|
|
386
386
|
ref={(element) => this.inputSatellite = element} />
|
|
@@ -388,8 +388,8 @@ export default class Publish5 extends React.Component {
|
|
|
388
388
|
<IconFeatures
|
|
389
389
|
iconSource={require('./assets/images/fire.png')}
|
|
390
390
|
iconHoverSource={require('./assets/images/fire-hover.png')}
|
|
391
|
-
iconText={this.state.
|
|
392
|
-
visible={this.state.
|
|
391
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "fireplace" })[0]?.label}
|
|
392
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "fireplace" }).length > 0}
|
|
393
393
|
selected={this.props.postingAd.fireplace}
|
|
394
394
|
onPress={(value) => this.props.postingAd.fireplace = value}
|
|
395
395
|
ref={(element) => this.inputFirePlace = element} />
|
|
@@ -397,8 +397,8 @@ export default class Publish5 extends React.Component {
|
|
|
397
397
|
<IconFeatures
|
|
398
398
|
iconSource={require('./assets/images/air.png')}
|
|
399
399
|
iconHoverSource={require('./assets/images/air-hover.png')}
|
|
400
|
-
iconText={this.state.
|
|
401
|
-
visible={this.state.
|
|
400
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "airConditioning" })[0]?.label}
|
|
401
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "airConditioning" }).length > 0}
|
|
402
402
|
selected={this.props.postingAd.airConditioning}
|
|
403
403
|
onPress={(value) => this.props.postingAd.airConditioning = value}
|
|
404
404
|
ref={(element) => this.inputAir = element} />
|
|
@@ -406,8 +406,8 @@ export default class Publish5 extends React.Component {
|
|
|
406
406
|
<IconFeatures
|
|
407
407
|
iconSource={require('./assets/images/heating.png')}
|
|
408
408
|
iconHoverSource={require('./assets/images/heating-hover.png')}
|
|
409
|
-
iconText={this.state.
|
|
410
|
-
visible={this.state.
|
|
409
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "heating" })[0]?.label}
|
|
410
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "heating" }).length > 0}
|
|
411
411
|
selected={this.props.postingAd.heating}
|
|
412
412
|
onPress={(value) => this.props.postingAd.heating = value}
|
|
413
413
|
ref={(element) => this.inputHeating = element} />
|
|
@@ -415,8 +415,8 @@ export default class Publish5 extends React.Component {
|
|
|
415
415
|
<IconFeatures
|
|
416
416
|
iconSource={require('./assets/images/security.png')}
|
|
417
417
|
iconHoverSource={require('./assets/images/security-hover.png')}
|
|
418
|
-
iconText={this.state.
|
|
419
|
-
visible={this.state.
|
|
418
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "security" })[0]?.label}
|
|
419
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "security" }).length > 0}
|
|
420
420
|
selected={this.props.postingAd.security}
|
|
421
421
|
onPress={(value) => this.props.postingAd.security = value}
|
|
422
422
|
ref={(element) => this.inputSecurity = element} />
|
|
@@ -424,8 +424,8 @@ export default class Publish5 extends React.Component {
|
|
|
424
424
|
<IconFeatures
|
|
425
425
|
iconSource={require('./assets/images/glazing.png')}
|
|
426
426
|
iconHoverSource={require('./assets/images/glazing-hover.png')}
|
|
427
|
-
iconText={this.state.
|
|
428
|
-
visible={this.state.
|
|
427
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "doubleGlazing" })[0]?.label}
|
|
428
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "doubleGlazing" }).length > 0}
|
|
429
429
|
selected={this.props.postingAd.doubleGlazing}
|
|
430
430
|
onPress={(value) => this.props.postingAd.doubleGlazing = value}
|
|
431
431
|
ref={(element) => this.inputDoubleGlazing = element} />
|
|
@@ -433,8 +433,8 @@ export default class Publish5 extends React.Component {
|
|
|
433
433
|
<IconFeatures
|
|
434
434
|
iconSource={require('./assets/images/door.png')}
|
|
435
435
|
iconHoverSource={require('./assets/images/door-hover.png')}
|
|
436
|
-
iconText={this.state.
|
|
437
|
-
visible={this.state.
|
|
436
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "reinforcedDoor" })[0]?.label}
|
|
437
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "reinforcedDoor" }).length > 0}
|
|
438
438
|
selected={this.props.postingAd.reinforcedDoor}
|
|
439
439
|
onPress={(value) => this.props.postingAd.reinforcedDoor = value}
|
|
440
440
|
ref={(element) => this.inputReinforcedDoor = element} />
|
|
@@ -446,8 +446,8 @@ export default class Publish5 extends React.Component {
|
|
|
446
446
|
<IconFeatures
|
|
447
447
|
iconSource={require('./assets/images/kitchen.png')}
|
|
448
448
|
iconHoverSource={require('./assets/images/kitchen-hover.png')}
|
|
449
|
-
iconText={this.state.
|
|
450
|
-
visible={this.state.
|
|
449
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "fullKitchen" })[0]?.label}
|
|
450
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "fullKitchen" }).length > 0}
|
|
451
451
|
selected={this.props.postingAd.fullKitchen}
|
|
452
452
|
onPress={(value) => this.props.postingAd.fullKitchen = value}
|
|
453
453
|
ref={(element) => this.inputFullKitchen = element} />
|
|
@@ -455,8 +455,8 @@ export default class Publish5 extends React.Component {
|
|
|
455
455
|
<IconFeatures
|
|
456
456
|
iconSource={require('./assets/images/fridge.png')}
|
|
457
457
|
iconHoverSource={require('./assets/images/fridge-hover.png')}
|
|
458
|
-
iconText={this.state.
|
|
459
|
-
visible={this.state.
|
|
458
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "fridge" })[0]?.label}
|
|
459
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "fridge" }).length > 0}
|
|
460
460
|
selected={this.props.postingAd.fridge}
|
|
461
461
|
onPress={(value) => this.props.postingAd.fridge = value}
|
|
462
462
|
ref={(element) => this.inputFridge = element} />
|
|
@@ -464,8 +464,8 @@ export default class Publish5 extends React.Component {
|
|
|
464
464
|
<IconFeatures
|
|
465
465
|
iconSource={require('./assets/images/oven.png')}
|
|
466
466
|
iconHoverSource={require('./assets/images/oven-hover.png')}
|
|
467
|
-
iconText={this.state.
|
|
468
|
-
visible={this.state.
|
|
467
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "oven" })[0]?.label}
|
|
468
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "oven" }).length > 0}
|
|
469
469
|
selected={this.props.postingAd.oven}
|
|
470
470
|
onPress={(value) => this.props.postingAd.oven = value}
|
|
471
471
|
ref={(element) => this.inputOven = element} />
|
|
@@ -473,8 +473,8 @@ export default class Publish5 extends React.Component {
|
|
|
473
473
|
<IconFeatures
|
|
474
474
|
iconSource={require('./assets/images/tv.png')}
|
|
475
475
|
iconHoverSource={require('./assets/images/tv-hover.png')}
|
|
476
|
-
iconText={this.state.
|
|
477
|
-
visible={this.state.
|
|
476
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "tv" })[0]?.label}
|
|
477
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "tv" }).length > 0}
|
|
478
478
|
selected={this.props.postingAd.tv}
|
|
479
479
|
onPress={(value) => this.props.postingAd.tv = value}
|
|
480
480
|
ref={(element) => this.inputTv = element} />
|
|
@@ -482,8 +482,8 @@ export default class Publish5 extends React.Component {
|
|
|
482
482
|
<IconFeatures
|
|
483
483
|
iconSource={require('./assets/images/washing.png')}
|
|
484
484
|
iconHoverSource={require('./assets/images/washing-hover.png')}
|
|
485
|
-
iconText={this.state.
|
|
486
|
-
visible={this.state.
|
|
485
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "washer" })[0]?.label}
|
|
486
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "washer" }).length > 0}
|
|
487
487
|
selected={this.props.postingAd.washer}
|
|
488
488
|
onPress={(value) => this.props.postingAd.washer = value}
|
|
489
489
|
ref={(element) => this.inputWashing = element} />
|
|
@@ -491,8 +491,8 @@ export default class Publish5 extends React.Component {
|
|
|
491
491
|
<IconFeatures
|
|
492
492
|
iconSource={require('./assets/images/microwave.png')}
|
|
493
493
|
iconHoverSource={require('./assets/images/microwave-hover.png')}
|
|
494
|
-
iconText={this.state.
|
|
495
|
-
visible={this.state.
|
|
494
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "microwave" })[0]?.label}
|
|
495
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "microwave" }).length > 0}
|
|
496
496
|
selected={this.props.postingAd.microwave}
|
|
497
497
|
onPress={(value) => this.props.postingAd.microwave = value}
|
|
498
498
|
ref={(element) => this.inputMicrowaves = element} />
|
|
@@ -500,8 +500,8 @@ export default class Publish5 extends React.Component {
|
|
|
500
500
|
<IconFeatures
|
|
501
501
|
iconSource={require('./assets/images/internet.png')}
|
|
502
502
|
iconHoverSource={require('./assets/images/internet-hover.png')}
|
|
503
|
-
iconText={this.state.
|
|
504
|
-
visible={this.state.
|
|
503
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "internet" })[0]?.label}
|
|
504
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "internet" }).length > 0}
|
|
505
505
|
selected={this.props.postingAd.internet}
|
|
506
506
|
onPress={(value) => this.props.postingAd.internet = value}
|
|
507
507
|
ref={(element) => this.inputInternet = element} />
|
|
@@ -510,8 +510,8 @@ export default class Publish5 extends React.Component {
|
|
|
510
510
|
<IconFeatures
|
|
511
511
|
iconSource={require('./assets/images/animals.png')}
|
|
512
512
|
iconHoverSource={require('./assets/images/animals-hover.png')}
|
|
513
|
-
iconText={this.state.
|
|
514
|
-
visible={this.state.
|
|
513
|
+
iconText={this.state.adTypeDetails.filter(function (detail) { return detail.value == "animals" })[0]?.label}
|
|
514
|
+
visible={this.state.adTypeDetails.filter(function (detail) { return detail.value == "animals" }).length > 0}
|
|
515
515
|
selected={this.props.postingAd.animals}
|
|
516
516
|
onPress={(value) => this.props.postingAd.animals = value}
|
|
517
517
|
ref={(element) => this.inputAnimals = element} />
|
package/Publish6.js
CHANGED
|
@@ -76,7 +76,7 @@ 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.
|
|
79
|
+
delete ad.adTypeDetails;
|
|
80
80
|
delete ad.languages;
|
|
81
81
|
const responseJson = await this.props.request(this.props.context, GENERATE_TITLE_DESCRIPTION, ad);
|
|
82
82
|
|
package/locales/ar.json
CHANGED
package/locales/en.json
CHANGED
package/locales/es.json
CHANGED
package/locales/fr.json
CHANGED
package/locales/it.json
CHANGED
package/locales/nl.json
CHANGED