ordering-components-external 13.2.17 → 13.2.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/_bundles/{7.ordering-component.7ec1e035382ea280a237.js → 7.ordering-component.14952af682175cdca2c7.js} +1 -1
- package/_bundles/{ordering-component.7ec1e035382ea280a237.js → ordering-component.14952af682175cdca2c7.js} +2 -2
- package/_modules/components/GoogleAutocompleteInput/index.js +1 -1
- package/_modules/components/GoogleMaps/index.js +30 -6
- package/_modules/components/GpsButton/index.js +34 -3
- package/_modules/components/PaymentOptionStripeLink/index.js +14 -13
- package/package.json +1 -1
- package/src/components/GoogleAutocompleteInput/index.js +3 -3
- package/src/components/GoogleMaps/index.js +29 -5
- package/src/components/GpsButton/index.js +28 -2
- package/src/components/PaymentOptionStripeLink/index.js +2 -1
- /package/_bundles/{0.ordering-component.7ec1e035382ea280a237.js → 0.ordering-component.14952af682175cdca2c7.js} +0 -0
- /package/_bundles/{1.ordering-component.7ec1e035382ea280a237.js → 1.ordering-component.14952af682175cdca2c7.js} +0 -0
- /package/_bundles/{2.ordering-component.7ec1e035382ea280a237.js → 2.ordering-component.14952af682175cdca2c7.js} +0 -0
- /package/_bundles/{4.ordering-component.7ec1e035382ea280a237.js → 4.ordering-component.14952af682175cdca2c7.js} +0 -0
- /package/_bundles/{5.ordering-component.7ec1e035382ea280a237.js → 5.ordering-component.14952af682175cdca2c7.js} +0 -0
- /package/_bundles/{6.ordering-component.7ec1e035382ea280a237.js → 6.ordering-component.14952af682175cdca2c7.js} +0 -0
- /package/_bundles/{7.ordering-component.7ec1e035382ea280a237.js.LICENSE.txt → 7.ordering-component.14952af682175cdca2c7.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-component.7ec1e035382ea280a237.js → 8.ordering-component.14952af682175cdca2c7.js} +0 -0
- /package/_bundles/{ordering-component.7ec1e035382ea280a237.js.LICENSE.txt → ordering-component.14952af682175cdca2c7.js.LICENSE.txt} +0 -0
|
@@ -82,7 +82,7 @@ var AutocompleteInput = function AutocompleteInput(props) {
|
|
|
82
82
|
if (addressType === 'locality') {
|
|
83
83
|
addressObj.locality = component.long_name;
|
|
84
84
|
}
|
|
85
|
-
if ((
|
|
85
|
+
if ((_component$types = component.types) !== null && _component$types !== void 0 && _component$types.includes('sublocality')) {
|
|
86
86
|
addressObj.sublocality = component.long_name;
|
|
87
87
|
}
|
|
88
88
|
if (addressType === 'country') {
|
|
@@ -189,18 +189,43 @@ var GoogleMaps = exports.GoogleMaps = function GoogleMaps(props) {
|
|
|
189
189
|
latLng: pos
|
|
190
190
|
}, function (results) {
|
|
191
191
|
var _results$;
|
|
192
|
-
var zipcode = null;
|
|
193
192
|
if (results && results.length > 0 && results !== null && results !== void 0 && (_results$ = results[0]) !== null && _results$ !== void 0 && _results$.address_components) {
|
|
194
193
|
var _address$location, _address$location2;
|
|
194
|
+
var addressObj = {};
|
|
195
195
|
var _iterator2 = _createForOfIteratorHelper(results[0].address_components),
|
|
196
196
|
_step2;
|
|
197
197
|
try {
|
|
198
198
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
199
|
+
var _component$types;
|
|
199
200
|
var component = _step2.value;
|
|
200
201
|
var addressType = component.types[0];
|
|
201
202
|
if (addressType === 'postal_code') {
|
|
202
|
-
zipcode = component.short_name;
|
|
203
|
-
|
|
203
|
+
addressObj.zipcode = component.short_name;
|
|
204
|
+
}
|
|
205
|
+
if (addressType === 'street_number') {
|
|
206
|
+
addressObj.street_number = component.long_name;
|
|
207
|
+
}
|
|
208
|
+
if (addressType === 'neighborhood') {
|
|
209
|
+
addressObj.neighborhood = component.long_name;
|
|
210
|
+
}
|
|
211
|
+
if (addressType === 'route') {
|
|
212
|
+
addressObj.route = component.short_name;
|
|
213
|
+
}
|
|
214
|
+
if (addressType === 'locality') {
|
|
215
|
+
addressObj.locality = component.long_name;
|
|
216
|
+
}
|
|
217
|
+
if ((_component$types = component.types) !== null && _component$types !== void 0 && _component$types.includes('sublocality')) {
|
|
218
|
+
addressObj.sublocality = component.long_name;
|
|
219
|
+
}
|
|
220
|
+
if (addressType === 'country') {
|
|
221
|
+
addressObj.country = component.long_name;
|
|
222
|
+
addressObj.country_code = component.short_name;
|
|
223
|
+
}
|
|
224
|
+
if (addressType === 'administrative_area_level_1') {
|
|
225
|
+
addressObj.state = component.long_name;
|
|
226
|
+
}
|
|
227
|
+
if (addressType === 'administrative_area_level_2') {
|
|
228
|
+
addressObj.city = component.long_name;
|
|
204
229
|
}
|
|
205
230
|
}
|
|
206
231
|
} catch (err) {
|
|
@@ -208,14 +233,13 @@ var GoogleMaps = exports.GoogleMaps = function GoogleMaps(props) {
|
|
|
208
233
|
} finally {
|
|
209
234
|
_iterator2.f();
|
|
210
235
|
}
|
|
211
|
-
var address = {
|
|
236
|
+
var address = _objectSpread({
|
|
212
237
|
address: results[0].formatted_address,
|
|
213
238
|
location: {
|
|
214
239
|
lat: pos === null || pos === void 0 ? void 0 : pos.lat(),
|
|
215
240
|
lng: pos === null || pos === void 0 ? void 0 : pos.lng()
|
|
216
241
|
}
|
|
217
|
-
};
|
|
218
|
-
if (zipcode) address.zipcode = zipcode;
|
|
242
|
+
}, addressObj);
|
|
219
243
|
handleChangeAddressMap && handleChangeAddressMap(address);
|
|
220
244
|
center.lat = (_address$location = address.location) === null || _address$location === void 0 ? void 0 : _address$location.lat;
|
|
221
245
|
center.lng = (_address$location2 = address.location) === null || _address$location2 === void 0 ? void 0 : _address$location2.lng;
|
|
@@ -13,6 +13,11 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
13
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
15
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
21
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
17
22
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
18
23
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -60,16 +65,42 @@ var GpsButton = exports.GpsButton = function GpsButton(props) {
|
|
|
60
65
|
var _results$;
|
|
61
66
|
setIsLoading(false);
|
|
62
67
|
var postalCode = null;
|
|
68
|
+
var addressObj = {};
|
|
63
69
|
if (results !== null && results !== void 0 && (_results$ = results[0]) !== null && _results$ !== void 0 && _results$.address_components) {
|
|
64
70
|
var _iterator = _createForOfIteratorHelper(results[0].address_components),
|
|
65
71
|
_step;
|
|
66
72
|
try {
|
|
67
73
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
74
|
+
var _component$types;
|
|
68
75
|
var component = _step.value;
|
|
69
76
|
var addressType = component.types[0];
|
|
70
77
|
if (addressType === 'postal_code') {
|
|
71
78
|
postalCode = component.short_name;
|
|
72
|
-
|
|
79
|
+
}
|
|
80
|
+
if (addressType === 'street_number') {
|
|
81
|
+
addressObj.street_number = component.long_name;
|
|
82
|
+
}
|
|
83
|
+
if (addressType === 'neighborhood') {
|
|
84
|
+
addressObj.neighborhood = component.long_name;
|
|
85
|
+
}
|
|
86
|
+
if (addressType === 'route') {
|
|
87
|
+
addressObj.route = component.short_name;
|
|
88
|
+
}
|
|
89
|
+
if (addressType === 'locality') {
|
|
90
|
+
addressObj.locality = component.long_name;
|
|
91
|
+
}
|
|
92
|
+
if ((_component$types = component.types) !== null && _component$types !== void 0 && _component$types.includes('sublocality')) {
|
|
93
|
+
addressObj.sublocality = component.long_name;
|
|
94
|
+
}
|
|
95
|
+
if (addressType === 'country') {
|
|
96
|
+
addressObj.country = component.long_name;
|
|
97
|
+
addressObj.country_code = component.short_name;
|
|
98
|
+
}
|
|
99
|
+
if (addressType === 'administrative_area_level_1') {
|
|
100
|
+
addressObj.state = component.long_name;
|
|
101
|
+
}
|
|
102
|
+
if (addressType === 'administrative_area_level_2') {
|
|
103
|
+
addressObj.city = component.long_name;
|
|
73
104
|
}
|
|
74
105
|
}
|
|
75
106
|
} catch (err) {
|
|
@@ -78,7 +109,7 @@ var GpsButton = exports.GpsButton = function GpsButton(props) {
|
|
|
78
109
|
_iterator.f();
|
|
79
110
|
}
|
|
80
111
|
if (status === 'OK') {
|
|
81
|
-
onAddress({
|
|
112
|
+
onAddress(_objectSpread({
|
|
82
113
|
address: results[0].formatted_address,
|
|
83
114
|
location: location,
|
|
84
115
|
utc_offset: new Date().getTimezoneOffset(),
|
|
@@ -87,7 +118,7 @@ var GpsButton = exports.GpsButton = function GpsButton(props) {
|
|
|
87
118
|
library: 'google',
|
|
88
119
|
place_id: results[0].place_id
|
|
89
120
|
}
|
|
90
|
-
});
|
|
121
|
+
}, addressObj));
|
|
91
122
|
} else {
|
|
92
123
|
onError && onError(t('ERROR_GPS_BUTTON', 'Error to get result with gps button'));
|
|
93
124
|
}
|
|
@@ -64,7 +64,7 @@ var PaymentOptionStripeLink = exports.PaymentOptionStripeLink = function Payment
|
|
|
64
64
|
};
|
|
65
65
|
var handleSendStripeLink = /*#__PURE__*/function () {
|
|
66
66
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(type, callback) {
|
|
67
|
-
var data, response, _yield$response$json, result, error;
|
|
67
|
+
var customProviders, data, response, _yield$response$json, result, error;
|
|
68
68
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
69
69
|
while (1) switch (_context.prev = _context.next) {
|
|
70
70
|
case 0:
|
|
@@ -72,14 +72,15 @@ var PaymentOptionStripeLink = exports.PaymentOptionStripeLink = function Payment
|
|
|
72
72
|
setStripeLinkState(_objectSpread(_objectSpread({}, stripeLinkState), {}, {
|
|
73
73
|
loading: true
|
|
74
74
|
}));
|
|
75
|
+
customProviders = ['pizzahutstaging', 'pizzahutmexico'];
|
|
75
76
|
data = {
|
|
76
77
|
type: type,
|
|
77
|
-
provider: (ordering === null || ordering === void 0 ? void 0 : ordering.project)
|
|
78
|
+
provider: customProviders.includes(ordering === null || ordering === void 0 ? void 0 : ordering.project) ? 'custom' : 'twilio',
|
|
78
79
|
country_phone_code: userInfo.country_phone_code,
|
|
79
80
|
cellphone: userInfo.cellphone,
|
|
80
81
|
message: t('LINK_TO_PAY_MESSAGE', 'Hello there _name_ _lastname_, click on the following link to complete the payment: _link_').replace('_name_', userInfo === null || userInfo === void 0 ? void 0 : userInfo.name).replace('_lastname_', userInfo === null || userInfo === void 0 ? void 0 : userInfo.lastname).replace('_link_', paymentURL)
|
|
81
82
|
};
|
|
82
|
-
_context.next =
|
|
83
|
+
_context.next = 6;
|
|
83
84
|
return fetch("".concat(ordering.root, "/text_messages/send"), {
|
|
84
85
|
method: 'POST',
|
|
85
86
|
headers: {
|
|
@@ -89,16 +90,16 @@ var PaymentOptionStripeLink = exports.PaymentOptionStripeLink = function Payment
|
|
|
89
90
|
},
|
|
90
91
|
body: JSON.stringify(data)
|
|
91
92
|
});
|
|
92
|
-
case
|
|
93
|
+
case 6:
|
|
93
94
|
response = _context.sent;
|
|
94
|
-
_context.next =
|
|
95
|
+
_context.next = 9;
|
|
95
96
|
return response.json();
|
|
96
|
-
case
|
|
97
|
+
case 9:
|
|
97
98
|
_yield$response$json = _context.sent;
|
|
98
99
|
result = _yield$response$json.result;
|
|
99
100
|
error = _yield$response$json.error;
|
|
100
101
|
if (!error) {
|
|
101
|
-
_context.next =
|
|
102
|
+
_context.next = 15;
|
|
102
103
|
break;
|
|
103
104
|
}
|
|
104
105
|
setStripeLinkState(_objectSpread(_objectSpread({}, stripeLinkState), {}, {
|
|
@@ -106,26 +107,26 @@ var PaymentOptionStripeLink = exports.PaymentOptionStripeLink = function Payment
|
|
|
106
107
|
error: result
|
|
107
108
|
}));
|
|
108
109
|
return _context.abrupt("return");
|
|
109
|
-
case
|
|
110
|
+
case 15:
|
|
110
111
|
setStripeLinkState(_objectSpread(_objectSpread({}, stripeLinkState), {}, {
|
|
111
112
|
loading: false
|
|
112
113
|
}));
|
|
113
114
|
callback && callback();
|
|
114
115
|
showToast(_ToastContext.ToastType.Success, t('MESSAGE_SENT_SUCCESSFULLY', 'The link has been sent'));
|
|
115
|
-
_context.next =
|
|
116
|
+
_context.next = 23;
|
|
116
117
|
break;
|
|
117
|
-
case
|
|
118
|
-
_context.prev =
|
|
118
|
+
case 20:
|
|
119
|
+
_context.prev = 20;
|
|
119
120
|
_context.t0 = _context["catch"](0);
|
|
120
121
|
setStripeLinkState(_objectSpread(_objectSpread({}, stripeLinkState), {}, {
|
|
121
122
|
loading: false,
|
|
122
123
|
error: [_context.t0.message]
|
|
123
124
|
}));
|
|
124
|
-
case
|
|
125
|
+
case 23:
|
|
125
126
|
case "end":
|
|
126
127
|
return _context.stop();
|
|
127
128
|
}
|
|
128
|
-
}, _callee, null, [[0,
|
|
129
|
+
}, _callee, null, [[0, 20]]);
|
|
129
130
|
}));
|
|
130
131
|
return function handleSendStripeLink(_x, _x2) {
|
|
131
132
|
return _ref.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -27,8 +27,8 @@ const AutocompleteInput = (props) => {
|
|
|
27
27
|
})
|
|
28
28
|
|
|
29
29
|
const options = {
|
|
30
|
-
types
|
|
31
|
-
fields
|
|
30
|
+
types,
|
|
31
|
+
fields
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
if (countryCode !== '*') {
|
|
@@ -61,7 +61,7 @@ const AutocompleteInput = (props) => {
|
|
|
61
61
|
if (addressType === 'locality') {
|
|
62
62
|
addressObj.locality = component.long_name
|
|
63
63
|
}
|
|
64
|
-
if (component.types?.includes('sublocality')
|
|
64
|
+
if (component.types?.includes('sublocality')) {
|
|
65
65
|
addressObj.sublocality = component.long_name
|
|
66
66
|
}
|
|
67
67
|
if (addressType === 'country') {
|
|
@@ -130,20 +130,44 @@ export const GoogleMaps = (props) => {
|
|
|
130
130
|
const geocoder = new window.google.maps.Geocoder()
|
|
131
131
|
|
|
132
132
|
geocoder.geocode({ latLng: pos }, (results) => {
|
|
133
|
-
let zipcode = null
|
|
134
133
|
if (results && results.length > 0 && results?.[0]?.address_components) {
|
|
134
|
+
const addressObj = {}
|
|
135
135
|
for (const component of results[0].address_components) {
|
|
136
136
|
const addressType = component.types[0]
|
|
137
137
|
if (addressType === 'postal_code') {
|
|
138
|
-
zipcode = component.short_name
|
|
139
|
-
|
|
138
|
+
addressObj.zipcode = component.short_name
|
|
139
|
+
}
|
|
140
|
+
if (addressType === 'street_number') {
|
|
141
|
+
addressObj.street_number = component.long_name
|
|
142
|
+
}
|
|
143
|
+
if (addressType === 'neighborhood') {
|
|
144
|
+
addressObj.neighborhood = component.long_name
|
|
145
|
+
}
|
|
146
|
+
if (addressType === 'route') {
|
|
147
|
+
addressObj.route = component.short_name
|
|
148
|
+
}
|
|
149
|
+
if (addressType === 'locality') {
|
|
150
|
+
addressObj.locality = component.long_name
|
|
151
|
+
}
|
|
152
|
+
if (component.types?.includes('sublocality')) {
|
|
153
|
+
addressObj.sublocality = component.long_name
|
|
154
|
+
}
|
|
155
|
+
if (addressType === 'country') {
|
|
156
|
+
addressObj.country = component.long_name
|
|
157
|
+
addressObj.country_code = component.short_name
|
|
158
|
+
}
|
|
159
|
+
if (addressType === 'administrative_area_level_1') {
|
|
160
|
+
addressObj.state = component.long_name
|
|
161
|
+
}
|
|
162
|
+
if (addressType === 'administrative_area_level_2') {
|
|
163
|
+
addressObj.city = component.long_name
|
|
140
164
|
}
|
|
141
165
|
}
|
|
142
166
|
const address = {
|
|
143
167
|
address: results[0].formatted_address,
|
|
144
|
-
location: { lat: pos?.lat(), lng: pos?.lng() }
|
|
168
|
+
location: { lat: pos?.lat(), lng: pos?.lng() },
|
|
169
|
+
...addressObj
|
|
145
170
|
}
|
|
146
|
-
if (zipcode) address.zipcode = zipcode
|
|
147
171
|
|
|
148
172
|
handleChangeAddressMap && handleChangeAddressMap(address)
|
|
149
173
|
|
|
@@ -38,12 +38,37 @@ export const GpsButton = (props) => {
|
|
|
38
38
|
geocoder.geocode({ location }, (results, status) => {
|
|
39
39
|
setIsLoading(false)
|
|
40
40
|
let postalCode = null
|
|
41
|
+
const addressObj = {}
|
|
41
42
|
if (results?.[0]?.address_components) {
|
|
42
43
|
for (const component of results[0].address_components) {
|
|
43
44
|
const addressType = component.types[0]
|
|
44
45
|
if (addressType === 'postal_code') {
|
|
45
46
|
postalCode = component.short_name
|
|
46
|
-
|
|
47
|
+
}
|
|
48
|
+
if (addressType === 'street_number') {
|
|
49
|
+
addressObj.street_number = component.long_name
|
|
50
|
+
}
|
|
51
|
+
if (addressType === 'neighborhood') {
|
|
52
|
+
addressObj.neighborhood = component.long_name
|
|
53
|
+
}
|
|
54
|
+
if (addressType === 'route') {
|
|
55
|
+
addressObj.route = component.short_name
|
|
56
|
+
}
|
|
57
|
+
if (addressType === 'locality') {
|
|
58
|
+
addressObj.locality = component.long_name
|
|
59
|
+
}
|
|
60
|
+
if (component.types?.includes('sublocality')) {
|
|
61
|
+
addressObj.sublocality = component.long_name
|
|
62
|
+
}
|
|
63
|
+
if (addressType === 'country') {
|
|
64
|
+
addressObj.country = component.long_name
|
|
65
|
+
addressObj.country_code = component.short_name
|
|
66
|
+
}
|
|
67
|
+
if (addressType === 'administrative_area_level_1') {
|
|
68
|
+
addressObj.state = component.long_name
|
|
69
|
+
}
|
|
70
|
+
if (addressType === 'administrative_area_level_2') {
|
|
71
|
+
addressObj.city = component.long_name
|
|
47
72
|
}
|
|
48
73
|
}
|
|
49
74
|
if (status === 'OK') {
|
|
@@ -55,7 +80,8 @@ export const GpsButton = (props) => {
|
|
|
55
80
|
map_data: {
|
|
56
81
|
library: 'google',
|
|
57
82
|
place_id: results[0].place_id
|
|
58
|
-
}
|
|
83
|
+
},
|
|
84
|
+
...addressObj
|
|
59
85
|
})
|
|
60
86
|
} else {
|
|
61
87
|
onError && onError(t('ERROR_GPS_BUTTON', 'Error to get result with gps button'))
|
|
@@ -29,9 +29,10 @@ export const PaymentOptionStripeLink = (props) => {
|
|
|
29
29
|
const handleSendStripeLink = async (type, callback) => {
|
|
30
30
|
try {
|
|
31
31
|
setStripeLinkState({ ...stripeLinkState, loading: true })
|
|
32
|
+
const customProviders = ['pizzahutstaging', 'pizzahutmexico']
|
|
32
33
|
const data = {
|
|
33
34
|
type,
|
|
34
|
-
provider: ordering?.project
|
|
35
|
+
provider: customProviders.includes(ordering?.project) ? 'custom' : 'twilio',
|
|
35
36
|
country_phone_code: userInfo.country_phone_code,
|
|
36
37
|
cellphone: userInfo.cellphone,
|
|
37
38
|
message: t('LINK_TO_PAY_MESSAGE',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|