muba-posting 9.0.22 → 9.0.24

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.
Files changed (2) hide show
  1. package/Publish6.js +16 -0
  2. package/package.json +1 -1
package/Publish6.js CHANGED
@@ -16,6 +16,7 @@ const FontAwesomeIcon = createIconSetFromFontello(fontelloConfig);
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
18
  const CHECK_VIRTUAL_VISIT = { method: 'GET', url: '/controller/posting/check-virtual-visit' };
19
+ const SHOW_VERIFY_PHONE = { method: 'GET', url: '/controller/posting/show-verify-phone' };
19
20
  const PHONE_SEPARATOR = '###';
20
21
 
21
22
  let submitClicked;
@@ -39,6 +40,7 @@ export default class Publish6 extends React.Component {
39
40
  virtualVisit: this.props.postingAd.virtualVisit,
40
41
  showResetPassword: false,
41
42
  showLogin: false,
43
+ showVerifyPhone: false,
42
44
  accessUsers: {
43
45
  elements: [{ section: true, value: null, label: strings('setup.mainContact') }],
44
46
  selectedItem: null
@@ -131,6 +133,18 @@ export default class Publish6 extends React.Component {
131
133
  this.props.hideLoading();
132
134
  }
133
135
 
136
+ async showVerifyPhone() {
137
+ const body = {
138
+ };
139
+
140
+ if (this.props.businessId) {
141
+ body['businessId'] = this.props.businessId;
142
+ }
143
+
144
+ const verifyPhoneResponse = await this.props.request(this.props.context, SHOW_VERIFY_PHONE, body);
145
+ this.setState({ showVerifyPhone: verifyPhoneResponse.showVerify });
146
+ }
147
+
134
148
  async nextStep() {
135
149
  if (!submitClicked) {
136
150
  submitClicked = true;
@@ -290,6 +304,8 @@ export default class Publish6 extends React.Component {
290
304
  value={this.props.postingAd.phonesObject}
291
305
  country={this.props.country}
292
306
  maxPhones={3}
307
+ businessId={this.props.businessId}
308
+ verification={this.state.showVerifyPhone}
293
309
  required={true}
294
310
  disabled={!this.props.allowedToModify.phone}
295
311
  returnKeyType={"next"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-posting",
3
- "version": "9.0.22",
3
+ "version": "9.0.24",
4
4
  "description": "Posting",
5
5
  "main": "Posting.js",
6
6
  "scripts": {