ordering-ui-admin-external 1.43.35 → 1.43.36

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.
@@ -372,7 +372,7 @@ var SidebarMenuUI = function SidebarMenuUI(props) {
372
372
  var handleClickBilling = /*#__PURE__*/function () {
373
373
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
374
374
  var _billingState$result;
375
- var billingState, _billingState$result2;
375
+ var billingState, _billingState$result2, _billingState$result3, _billingState$result4;
376
376
  return _regeneratorRuntime().wrap(function _callee$(_context) {
377
377
  while (1) switch (_context.prev = _context.next) {
378
378
  case 0:
@@ -381,7 +381,7 @@ var SidebarMenuUI = function SidebarMenuUI(props) {
381
381
  case 2:
382
382
  billingState = _context.sent;
383
383
  if (!(billingState !== null && billingState !== void 0 && billingState.error) && billingState !== null && billingState !== void 0 && (_billingState$result = billingState.result) !== null && _billingState$result !== void 0 && _billingState$result.access_token) {
384
- window.open("".concat(billingUrl, "?token=").concat(billingState === null || billingState === void 0 || (_billingState$result2 = billingState.result) === null || _billingState$result2 === void 0 ? void 0 : _billingState$result2.access_token), '_blank');
384
+ window.open("".concat(billingState !== null && billingState !== void 0 && (_billingState$result2 = billingState.result) !== null && _billingState$result2 !== void 0 && _billingState$result2.referer_url ? "https://".concat(billingState === null || billingState === void 0 || (_billingState$result3 = billingState.result) === null || _billingState$result3 === void 0 ? void 0 : _billingState$result3.referer_url) : billingUrl, "?token=").concat(billingState === null || billingState === void 0 || (_billingState$result4 = billingState.result) === null || _billingState$result4 === void 0 ? void 0 : _billingState$result4.access_token), '_blank');
385
385
  }
386
386
  case 4:
387
387
  case "end":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-admin-external",
3
- "version": "1.43.35",
3
+ "version": "1.43.36",
4
4
  "description": "Ordering UI Admin Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -439,7 +439,12 @@ const SidebarMenuUI = (props) => {
439
439
  const handleClickBilling = async () => {
440
440
  const billingState = await getBillingToken()
441
441
  if (!billingState?.error && billingState?.result?.access_token) {
442
- window.open(`${billingUrl}?token=${billingState?.result?.access_token}`, '_blank')
442
+ window.open(
443
+ `${billingState?.result?.referer_url
444
+ ? `https://${billingState?.result?.referer_url}`
445
+ : billingUrl}?token=${billingState?.result?.access_token}`,
446
+ '_blank'
447
+ )
443
448
  }
444
449
  }
445
450