muba-posting 9.0.16 → 9.0.17
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/Publish6.js +37 -3
- package/locales/ar.json +2 -0
- package/locales/en.json +2 -0
- package/locales/es.json +2 -0
- package/locales/fr.json +2 -0
- package/locales/it.json +2 -0
- package/locales/nl.json +2 -0
- package/package.json +1 -1
package/Publish6.js
CHANGED
|
@@ -15,6 +15,7 @@ const FontAwesomeIcon = createIconSetFromFontello(fontelloConfig);
|
|
|
15
15
|
|
|
16
16
|
const GENERATE_TITLE_DESCRIPTION = { method: 'GET', url: '/controller/posting/generate-title-description' };
|
|
17
17
|
const PHONE_REGISTERED = { method: 'GET', url: '/controller/posting/phone-registered' };
|
|
18
|
+
const CHECK_VIRTUAL_VISIT = { method: 'GET', url: '/controller/posting/check-virtual-visit' };
|
|
18
19
|
const PHONE_SEPARATOR = '###';
|
|
19
20
|
|
|
20
21
|
let submitClicked;
|
|
@@ -30,10 +31,12 @@ export default class Publish6 extends React.Component {
|
|
|
30
31
|
this.state = {
|
|
31
32
|
hideSave: false,
|
|
32
33
|
requiredPhoneError: false,
|
|
34
|
+
virtualVisitError: false,
|
|
33
35
|
titleDescriptionLoaded: false,
|
|
34
36
|
languages: this.props.postingAd.languages,
|
|
35
37
|
picturesUploaded: 0,
|
|
36
38
|
reference: this.props.postingAd.reference,
|
|
39
|
+
virtualVisit: this.props.postingAd.virtualVisit,
|
|
37
40
|
showResetPassword: false,
|
|
38
41
|
showLogin: false,
|
|
39
42
|
accessUsers: {
|
|
@@ -171,10 +174,16 @@ export default class Publish6 extends React.Component {
|
|
|
171
174
|
|
|
172
175
|
this.languageItem.forEach(element => validate = element.validateLanguageItem() && validate);
|
|
173
176
|
}
|
|
177
|
+
this.setState({
|
|
178
|
+
requiredPhoneError: !validate,
|
|
179
|
+
loading: false
|
|
180
|
+
});
|
|
174
181
|
|
|
175
|
-
this.
|
|
176
|
-
|
|
177
|
-
|
|
182
|
+
if (this.state.virtualVisit != null && this.state.virtualVisit !== '') {
|
|
183
|
+
const virtualVisitResponse = await this.props.request(this.props.context, CHECK_VIRTUAL_VISIT, { virtualVisitUrl: this.state.virtualVisit });
|
|
184
|
+
validate = virtualVisitResponse.valid && validate;
|
|
185
|
+
this.setState({ virtualVisitError: !virtualVisitResponse.valid });
|
|
186
|
+
}
|
|
178
187
|
|
|
179
188
|
if (this.reference) {
|
|
180
189
|
validate = this.reference.onSubmitValidate() && validate;
|
|
@@ -196,6 +205,11 @@ export default class Publish6 extends React.Component {
|
|
|
196
205
|
this.setState({ reference: text });
|
|
197
206
|
}
|
|
198
207
|
|
|
208
|
+
onChangeVirtualVisit(text) {
|
|
209
|
+
this.props.postingAd.virtualVisit = text;
|
|
210
|
+
this.setState({ virtualVisit: text });
|
|
211
|
+
}
|
|
212
|
+
|
|
199
213
|
login() {
|
|
200
214
|
this.popupPhoneRegistered.hide();
|
|
201
215
|
navigate(this.props.context, Views.LOGIN, { RedirectTo: 'back', disableRegister: true, loadLeadData: false, lu: this.state.lu })
|
|
@@ -236,6 +250,26 @@ export default class Publish6 extends React.Component {
|
|
|
236
250
|
returnKeyType={"next"}
|
|
237
251
|
maxLength={50}
|
|
238
252
|
disabled={!this.props.allowedToModify.clientRef}
|
|
253
|
+
onSubmitEditing={(event) => { this.virtualVisit.current.focus(); }} />
|
|
254
|
+
</View>
|
|
255
|
+
:
|
|
256
|
+
null
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
{this.props.businessId ?
|
|
260
|
+
<View style={this.state.virtualVisitError ? [commonStyles.progressbarFieldContainer, commonStyles.fieldError] : commonStyles.progressbarFieldContainer}>
|
|
261
|
+
<View style={commonStyles.row}>
|
|
262
|
+
<Text style={commonStyles.progressbarField}>{strings('setup.virtualVisit')}</Text>
|
|
263
|
+
<Text style={commonStyles.subNote}> {strings('setup.virtualVisitHttps')}</Text>
|
|
264
|
+
</View>
|
|
265
|
+
<InputText value={this.state.virtualVisit} ref={(element) => this.virtualVisit = element}
|
|
266
|
+
placeholder={strings('setup.virtualVisit')}
|
|
267
|
+
required={false} onChangeText={(text) => this.onChangeVirtualVisit(text)}
|
|
268
|
+
style={commonStyles.input}
|
|
269
|
+
textContainerStyle={{ marginTop: 10 }}
|
|
270
|
+
returnKeyType={"next"}
|
|
271
|
+
maxLength={512}
|
|
272
|
+
disabled={!this.props.allowedToModify.virtualVisit}
|
|
239
273
|
onSubmitEditing={(event) => { this.phoneGroupRef.current.focus(); }} />
|
|
240
274
|
</View>
|
|
241
275
|
:
|
package/locales/ar.json
CHANGED
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
"phone": "الهواتف",
|
|
47
47
|
"reference": "المرجع",
|
|
48
48
|
"uniqueReference": "استخدم مرجعًا وحيدا للإعلان",
|
|
49
|
+
"virtualVisit": "زيارة افتراضية",
|
|
50
|
+
"virtualVisitHttps": "(//:https)",
|
|
49
51
|
"maxPhones": "الحد الأقصى 3 هواتف",
|
|
50
52
|
"existingPhone": "تم تخصيص هذا الرقم الهاتفي لمستخدم آخر",
|
|
51
53
|
"legalNote": "من خلال خلق هذا الإعلان ، فإنك توافق على شروط الاستخدام و سياسة الخصوصية الخاصة بشركة مبوب. نحن نحتفظ بالحق في حذف و / أو تعديل الإعلانات غير اللائقة.",
|
package/locales/en.json
CHANGED
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
"phone": "Phones",
|
|
47
47
|
"reference": "Reference",
|
|
48
48
|
"uniqueReference": "Use a unique reference for the ad",
|
|
49
|
+
"virtualVisit": "Virtual tour",
|
|
50
|
+
"virtualVisitHttps": "(https://)",
|
|
49
51
|
"maxPhones": "Maximum 3 phones",
|
|
50
52
|
"existingPhone": "This phone number is already used by another user",
|
|
51
53
|
"legalNote": "By creating this ad, you agree to Mubawab's Terms of Use and Privacy Policy. We reserve the right to delete and / or modify inappropriate ads.",
|
package/locales/es.json
CHANGED
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
"phone": "Teléfonos",
|
|
47
47
|
"reference": "Referencia",
|
|
48
48
|
"uniqueReference": "Utiliza una referencia única por anuncio",
|
|
49
|
+
"virtualVisit": "Tour virtual",
|
|
50
|
+
"virtualVisitHttps": "(https://)",
|
|
49
51
|
"maxPhones": "Máximo 3 teléfonos",
|
|
50
52
|
"existingPhone": "Este teléfono ya lo ha utilizado otro usuario",
|
|
51
53
|
"legalNote": "Al crear este anuncio, aceptas los Términos de uso y la Política de privacidad de Mubawab. Nos reservamos el derecho de eliminar y/o modificar anuncios inapropiados.",
|
package/locales/fr.json
CHANGED
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
"phone": "Téléphones",
|
|
47
47
|
"reference": "Référence",
|
|
48
48
|
"uniqueReference": "Utiliser une référence unique pour l'annonce",
|
|
49
|
+
"virtualVisit": "Visite virtuelle",
|
|
50
|
+
"virtualVisitHttps": "(https://)",
|
|
49
51
|
"maxPhones": "Maximum 3 téléphones",
|
|
50
52
|
"existingPhone": "Ce numéro de téléphone est déjà attribué à un autre utilisateur",
|
|
51
53
|
"legalNote": "En créant cette annonce, vous acceptez les conditions d'utilisation et la politique de confidentialité de Mubawab. Nous nous réservons le droit de supprimer et/ou de modifier des annonces inappropriées.",
|
package/locales/it.json
CHANGED
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
"phone": "Numero/i di telefono",
|
|
47
47
|
"reference": "Riferimento",
|
|
48
48
|
"uniqueReference": "Usa un unico riferimento per l'annuncio",
|
|
49
|
+
"virtualVisit": "Tour virtuale",
|
|
50
|
+
"virtualVisitHttps": "(https://)",
|
|
49
51
|
"maxPhones": "Massimo 3 telefoni",
|
|
50
52
|
"existingPhone": "Il numero di telefono è già usato da un altro utente",
|
|
51
53
|
"legalNote": "Creando questo annuncio accetti i termini di utilizzo e la politica sulla privacy di Mubawab. Ci riserviamo il diritto di eliminare e/o modificare annunci inappropriati.",
|
package/locales/nl.json
CHANGED
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
"phone": "Telefoonnummer(s)",
|
|
47
47
|
"reference": "Referentie",
|
|
48
48
|
"uniqueReference": "Gebruik een uniek referentienummer voor de advertentie",
|
|
49
|
+
"virtualVisit": "Virtuele tour",
|
|
50
|
+
"virtualVisitHttps": "(https://)",
|
|
49
51
|
"maxPhones": "Maximaal 3 telefoons",
|
|
50
52
|
"existingPhone": "Dit telefoonnummer wordt al gebruikt door een andere gebruiker",
|
|
51
53
|
"legalNote": "Door deze advertentie te maken, gaat u akkoord met de Gebruiksvoorwaarden en het Privacybeleid van Mubawab. We behouden ons het recht voor om ongepaste advertenties te verwijderen en/of te wijzigen.",
|