From 5604ce5596496f98a5a33094a5067c8c08cc82cb Mon Sep 17 00:00:00 2001 From: Santiago Palenque Date: Tue, 19 May 2026 18:24:13 -0300 Subject: [PATCH 1/6] chore: add show level purchases view --- src/actions/sponsor-purchases-actions.js | 131 ++++++++- src/components/menu/menu-definition.js | 5 + src/i18n/en.json | 11 + src/layouts/sponsor-layout.js | 19 +- .../sponsors/show-pages-list-page/index.js | 18 +- .../sponsors/show-purchase-list-page/index.js | 254 ++++++++++++++++++ .../tabs/sponsor-purchases-tab/index.js | 13 +- .../sponsors/show-purchase-list-reducer.js | 99 +++++++ src/store.js | 2 + 9 files changed, 525 insertions(+), 27 deletions(-) create mode 100644 src/pages/sponsors/show-purchase-list-page/index.js create mode 100644 src/reducers/sponsors/show-purchase-list-reducer.js diff --git a/src/actions/sponsor-purchases-actions.js b/src/actions/sponsor-purchases-actions.js index 2b38f833d..224ebeb99 100644 --- a/src/actions/sponsor-purchases-actions.js +++ b/src/actions/sponsor-purchases-actions.js @@ -19,7 +19,8 @@ import { postRequest, putRequest, startLoading, - stopLoading + stopLoading, + getCSV } from "openstack-uicore-foundation/lib/utils/actions"; import T from "i18n-react/dist/i18n-react"; import { escapeFilterValue, getAccessTokenSafely } from "../utils/methods"; @@ -31,6 +32,8 @@ import { } from "../utils/constants"; import { snackbarErrorHandler, snackbarSuccessHandler } from "./base-actions"; +export const REQUEST_ALL_SPONSOR_PURCHASES = "REQUEST_ALL_SPONSOR_PURCHASES"; +export const RECEIVE_ALL_SPONSOR_PURCHASES = "RECEIVE_ALL_SPONSOR_PURCHASES"; export const REQUEST_SPONSOR_PURCHASES = "REQUEST_SPONSOR_PURCHASES"; export const RECEIVE_SPONSOR_PURCHASES = "RECEIVE_SPONSOR_PURCHASES"; export const SPONSOR_PURCHASE_STATUS_UPDATED = @@ -40,6 +43,118 @@ export const CLEAR_SPONSOR_ORDER = "CLEAR_SPONSOR_ORDER"; export const SPONSOR_CLIENT_ADDRESS_UPDATED = "SPONSOR_CLIENT_ADDRESS_UPDATED"; export const SPONSOR_CLIENT_UPDATED = "SPONSOR_CLIENT_UPDATED"; +export const getAllSponsorPurchases = + ( + term = "", + page = DEFAULT_CURRENT_PAGE, + perPage = DEFAULT_PER_PAGE, + order = "created", + orderDir = -1 + ) => + async (dispatch, getState) => { + const { currentSummitState } = getState(); + const { currentSummit } = currentSummitState; + const accessToken = await getAccessTokenSafely(); + const filter = []; + + dispatch(startLoading()); + + if (term) { + const escapedTerm = escapeFilterValue(term); + filter.push( + `number==${escapedTerm},purchased_by_email=@${escapedTerm},purchased_by_full_name=@${escapedTerm}` + ); + } + + const params = { + page, + per_page: perPage, + access_token: accessToken, + expand: "sponsor" + }; + + if (filter.length > 0) { + params["filter[]"] = filter; + } + + // order + if (order != null && orderDir != null) { + const orderDirSign = orderDir === 1 ? "" : "-"; + switch (order) { + case "purchased": + params.order = `${orderDirSign}created`; + break; + case "amount": + params.order = `${orderDirSign}raw_amount`; + break; + default: + params.order = `${orderDirSign}${order}`; + } + } + + return getRequest( + createAction(REQUEST_ALL_SPONSOR_PURCHASES), + createAction(RECEIVE_ALL_SPONSOR_PURCHASES), + `${window.PURCHASES_API_URL}/api/v1/summits/${currentSummit.id}/purchases`, + authErrorHandler, + { order, orderDir, page, perPage, term } + )(params)(dispatch).then(() => { + dispatch(stopLoading()); + }); + }; + +export const exportAllSponsorPurchases = + (term = null, order, orderDir) => + async (dispatch, getState) => { + const { currentSummitState } = getState(); + const accessToken = await getAccessTokenSafely(); + const { currentSummit } = currentSummitState; + const filter = []; + const filename = `${currentSummit.id}-purchases.csv`; + + if (term) { + const escapedTerm = escapeFilterValue(term); + filter.push( + `number==${escapedTerm},purchased_by_email=@${escapedTerm},purchased_by_full_name=@${escapedTerm}` + ); + } + + const params = { + access_token: accessToken, + expand: "sponsor", + relations: "sponsor", + fields: + "order_number,purchased_date,sponsor.name,payment_method,status,amount" + }; + + if (filter.length > 0) { + params["filter[]"] = filter; + } + + // order + if (order != null && orderDir != null) { + const orderDirSign = orderDir === 1 ? "" : "-"; + switch (order) { + case "purchased": + params.order = `${orderDirSign}created`; + break; + case "amount": + params.order = `${orderDirSign}raw_amount`; + break; + default: + params.order = `${orderDirSign}${order}`; + } + } + + dispatch( + getCSV( + `${window.PURCHASES_API_URL}/api/v1/summits/${currentSummit.id}/purchases/csv`, + params, + filename + ) + ); + }; + export const getSponsorPurchases = ( term = "", @@ -101,10 +216,9 @@ export const getSponsorPurchases = }; export const approveSponsorPurchase = - (paymentId) => async (dispatch, getState) => { - const { currentSummitState, currentSponsorState } = getState(); + (sponsorId, paymentId) => async (dispatch, getState) => { + const { currentSummitState } = getState(); const { currentSummit } = currentSummitState; - const { entity: sponsor } = currentSponsorState; const accessToken = await getAccessTokenSafely(); const params = { @@ -119,7 +233,7 @@ export const approveSponsorPurchase = paymentId, status: PURCHASE_STATUS.PAID }), - `${window.PURCHASES_API_URL}/api/v1/summits/${currentSummit.id}/sponsors/${sponsor.id}/payments/${paymentId}/approve`, + `${window.PURCHASES_API_URL}/api/v1/summits/${currentSummit.id}/sponsors/${sponsorId}/payments/${paymentId}/approve`, {}, snackbarErrorHandler )(params)(dispatch) @@ -138,10 +252,9 @@ export const approveSponsorPurchase = }; export const rejectSponsorPurchase = - (paymentId) => async (dispatch, getState) => { - const { currentSummitState, currentSponsorState } = getState(); + (sponsorId, paymentId) => async (dispatch, getState) => { + const { currentSummitState } = getState(); const { currentSummit } = currentSummitState; - const { entity: sponsor } = currentSponsorState; const accessToken = await getAccessTokenSafely(); const params = { @@ -156,7 +269,7 @@ export const rejectSponsorPurchase = paymentId, status: PURCHASE_STATUS.CANCELLED }), - `${window.PURCHASES_API_URL}/api/v1/summits/${currentSummit.id}/sponsors/${sponsor.id}/payments/${paymentId}/cancel`, + `${window.PURCHASES_API_URL}/api/v1/summits/${currentSummit.id}/sponsors/${sponsorId}/payments/${paymentId}/cancel`, null, snackbarErrorHandler )(params)(dispatch) diff --git a/src/components/menu/menu-definition.js b/src/components/menu/menu-definition.js index d853d6d58..0baaa4985 100644 --- a/src/components/menu/menu-definition.js +++ b/src/components/menu/menu-definition.js @@ -218,6 +218,11 @@ export const getSummitItems = (summitId) => [ linkUrl: `summits/${summitId}/sponsors/pages`, accessRoute: "admin-sponsors" }, + { + name: "sponsor_purchases", + linkUrl: `summits/${summitId}/sponsors/purchases`, + accessRoute: "admin-sponsors" + }, { name: "sponsorship_list", linkUrl: `summits/${summitId}/sponsorships`, diff --git a/src/i18n/en.json b/src/i18n/en.json index 37f8d0580..744ba83a1 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -90,6 +90,7 @@ "to": "To", "from": "From", "placeholders": { + "search": "Search...", "search_speakers": "Search Speakers by Name, Email, Speaker Id or Member Id", "select_acceptance_criteria": "Select acceptance criteria", "select_invitation_status": "Select status" @@ -186,6 +187,7 @@ "sponsor_list": "Sponsor List", "sponsor_forms": "Forms", "sponsor_pages": "Pages", + "sponsor_purchases": "Purchases", "sponsorship_list": "Tiers", "sponsor_users": "Users", "sponsors_promocodes": "Promo Codes", @@ -2881,6 +2883,15 @@ } } }, + "sponsor_show_purchases": { + "order": "Order", + "purchased": "Purchased", + "payment_method": "Payment Method", + "status": "Status", + "amount": "Amount", + "details": "Details", + "purchases": "Purchases" + }, "sponsor_users": { "users": "Users", "access_request": "access request", diff --git a/src/layouts/sponsor-layout.js b/src/layouts/sponsor-layout.js index cba7da2e6..68dd29cd6 100644 --- a/src/layouts/sponsor-layout.js +++ b/src/layouts/sponsor-layout.js @@ -44,6 +44,9 @@ const SponsorUsersListPage = React.lazy(() => const ShowPagesListPage = React.lazy(() => import("../pages/sponsors/show-pages-list-page") ); +const SponsorOrdersListPage = React.lazy(() => + import("../pages/sponsors/show-purchase-list-page") +); const SponsorLayout = ({ match }) => (
@@ -85,20 +88,16 @@ const SponsorLayout = ({ match }) => ( /> ( -
- -
- )} strict exact component={ShowPagesListPage} /> + +
+ +

{T.translate("show_pages.pages")}

{ + useEffect(() => { + getAllSponsorPurchases(); + }, []); + + const handlePageChange = (page) => { + getAllSponsorPurchases(term, page, perPage, order, orderDir); + }; + + const handleSort = (key, dir) => { + getAllSponsorPurchases(term, currentPage, perPage, key, dir); + }; + + const handlePerPageChange = (newPerPage) => { + getAllSponsorPurchases( + term, + DEFAULT_CURRENT_PAGE, + newPerPage, + order, + orderDir + ); + }; + + const handleExport = () => { + exportAllSponsorPurchases(); + }; + + const handleSearch = (searchTerm) => { + getAllSponsorPurchases(searchTerm); + }; + + const handleDetails = (item) => { + history.push(`${item.sponsor_id}/purchases/${item.id}`); + }; + + const handleMenu = (item) => { + console.log("MENU : ", item); + }; + + const handleStatusChange = (sponsorId, purchaseId, newStatus) => { + if (newStatus === PURCHASE_STATUS.PAID) + approveSponsorPurchase(sponsorId, purchaseId); + if (newStatus === PURCHASE_STATUS.CANCELLED) + rejectSponsorPurchase(sponsorId, purchaseId); + }; + + const tableColumns = [ + { + columnKey: "number", + header: T.translate("sponsor_show_purchases.order"), + sortable: true + }, + { + columnKey: "purchased", + header: T.translate("sponsor_show_purchases.purchased"), + sortable: true + }, + { + columnKey: "payment_method", + header: T.translate("sponsor_show_purchases.payment_method"), + sortable: true + }, + { + columnKey: "status", + header: T.translate("sponsor_show_purchases.status"), + sortable: true, + render: (row) => { + if ( + row.payment_method === PURCHASE_METHODS.INVOICE && + row.status === PURCHASE_STATUS.PENDING + ) { + return ( + + ); + } + + return row.status; + } + }, + { + columnKey: "amount", + header: T.translate("sponsor_show_purchases.amount"), + sortable: true + }, + { + columnKey: "details", + header: "", + width: 100, + align: "center", + render: (row) => ( + + ) + }, + { + columnKey: "menu", + header: "", + width: 100, + align: "center", + render: (row) => ( + handleMenu(row)} + > + + + ) + } + ]; + + return ( +
+
+ +
+

{T.translate("sponsor_show_purchases.purchases")}

+ + + + {totalCount}{" "} + {T.translate("sponsor_show_purchases.purchases").toLowerCase()} + + + + + + + + + +
+ +
+
+ ); +}; + +const mapStateToProps = ({ showPurchaseListState }) => ({ + ...showPurchaseListState +}); + +export default connect(mapStateToProps, { + getAllSponsorPurchases, + exportAllSponsorPurchases, + approveSponsorPurchase, + rejectSponsorPurchase +})(ShowPurchaseListPage); diff --git a/src/pages/sponsors/sponsor-page/tabs/sponsor-purchases-tab/index.js b/src/pages/sponsors/sponsor-page/tabs/sponsor-purchases-tab/index.js index 9e7de9dfa..c7d0770a2 100644 --- a/src/pages/sponsors/sponsor-page/tabs/sponsor-purchases-tab/index.js +++ b/src/pages/sponsors/sponsor-page/tabs/sponsor-purchases-tab/index.js @@ -85,9 +85,10 @@ const SponsorPurchasesTab = ({ }; const handleStatusChange = (purchaseId, newStatus) => { - if (newStatus === PURCHASE_STATUS.PAID) approveSponsorPurchase(purchaseId); + if (newStatus === PURCHASE_STATUS.PAID) + approveSponsorPurchase(sponsor.id, purchaseId); if (newStatus === PURCHASE_STATUS.CANCELLED) - rejectSponsorPurchase(purchaseId); + rejectSponsorPurchase(sponsor.id, purchaseId); }; const tableColumns = [ @@ -149,7 +150,7 @@ const SponsorPurchasesTab = ({ render: (row) => (
diff --git a/src/pages/sponsors/show-purchase-list-page/index.js b/src/pages/sponsors/show-purchase-list-page/index.js index d5e0e72cc..43f42d840 100644 --- a/src/pages/sponsors/show-purchase-list-page/index.js +++ b/src/pages/sponsors/show-purchase-list-page/index.js @@ -76,7 +76,7 @@ const ShowPurchaseListPage = ({ }; const handleExport = () => { - exportAllSponsorPurchases(); + exportAllSponsorPurchases(term, order, orderDir); }; const handleSearch = (searchTerm) => { From b2072a3a9a7e0d5f9177e665d69154b40ad95ff0 Mon Sep 17 00:00:00 2001 From: Santiago Palenque Date: Tue, 26 May 2026 10:57:44 -0300 Subject: [PATCH 5/6] chore: API integration --- src/actions/sponsor-purchases-actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/actions/sponsor-purchases-actions.js b/src/actions/sponsor-purchases-actions.js index 6e9ca2d7a..2dcac7aeb 100644 --- a/src/actions/sponsor-purchases-actions.js +++ b/src/actions/sponsor-purchases-actions.js @@ -62,7 +62,7 @@ export const getAllSponsorPurchases = if (term) { const escapedTerm = escapeFilterValue(term); filter.push( - `number==${escapedTerm},company_name=@${escapedTerm},purchased_by_email=@${escapedTerm},purchased_by_full_name=@${escapedTerm}` + `number==${escapedTerm},sponsor_company_name=@${escapedTerm},purchased_by_email=@${escapedTerm},purchased_by_full_name=@${escapedTerm}` ); } @@ -121,7 +121,7 @@ export const exportAllSponsorPurchases = if (term) { const escapedTerm = escapeFilterValue(term); filter.push( - `number==${escapedTerm},company_name=@${escapedTerm},purchased_by_email=@${escapedTerm},purchased_by_full_name=@${escapedTerm}` + `number==${escapedTerm},sponsor_company_name=@${escapedTerm},purchased_by_email=@${escapedTerm},purchased_by_full_name=@${escapedTerm}` ); } From 93abe814e0a4f5385638a67a5e514067ab63eb7f Mon Sep 17 00:00:00 2001 From: Santiago Palenque Date: Wed, 27 May 2026 10:27:57 -0300 Subject: [PATCH 6/6] chore: add deep link to purchase details and disable refund on offline orders --- package.json | 2 +- src/actions/sponsor-purchases-actions.js | 2 +- src/components/mui/RefundForm/index.jsx | 17 +- src/i18n/en.json | 3 +- src/layouts/sponsor-id-layout.js | 267 +++++++++--------- .../sponsors/show-purchase-list-page/index.js | 1 + .../sponsor-order-details.js | 11 +- src/utils/constants.js | 5 + yarn.lock | 8 +- 9 files changed, 172 insertions(+), 144 deletions(-) diff --git a/package.json b/package.json index 67ffb6622..af6cbc9f7 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "moment": "^2.29.1", "moment-duration-format": "^2.3.2", "moment-timezone": "^0.5.33", - "openstack-uicore-foundation": "5.0.22", + "openstack-uicore-foundation": "5.0.29-beta.0", "p-limit": "^6.1.0", "path-browserify": "^1.0.1", "postcss-loader": "^6.2.1", diff --git a/src/actions/sponsor-purchases-actions.js b/src/actions/sponsor-purchases-actions.js index 2dcac7aeb..6d21e082f 100644 --- a/src/actions/sponsor-purchases-actions.js +++ b/src/actions/sponsor-purchases-actions.js @@ -73,7 +73,7 @@ export const getAllSponsorPurchases = expand: "sponsor", relations: "sponsor", fields: - "number,payment_id,purchased_date,sponsor.id,sponsor.company_name,payment_method,status,net_amount" + "id,number,payment_id,purchased_date,sponsor.id,sponsor.company_name,payment_method,status,net_amount" }; if (filter.length > 0) { diff --git a/src/components/mui/RefundForm/index.jsx b/src/components/mui/RefundForm/index.jsx index b545207e3..ca586e031 100644 --- a/src/components/mui/RefundForm/index.jsx +++ b/src/components/mui/RefundForm/index.jsx @@ -19,8 +19,9 @@ import { Box, Button, Grid2 } from "@mui/material"; import MuiFormikTextField from "openstack-uicore-foundation/lib/components/mui/formik-inputs/textfield"; import MuiFormikPriceField from "openstack-uicore-foundation/lib/components/mui/formik-inputs/price-field"; import InfoNote from "openstack-uicore-foundation/lib/components/mui/info-note"; +import CustomAlert from "openstack-uicore-foundation/lib/components/mui/custom-alert"; -const RefundForm = ({ onSubmit }) => { +const RefundForm = ({ onSubmit, disabled = false }) => { const formik = useFormik({ initialValues: { reason: "", @@ -56,6 +57,7 @@ const RefundForm = ({ onSubmit }) => { fullWidth size="small" label={T.translate("refund_form.reason")} + disabled={disabled} /> @@ -65,6 +67,7 @@ const RefundForm = ({ onSubmit }) => { size="small" inCents label={T.translate("refund_form.amount")} + disabled={disabled} /> @@ -74,13 +77,23 @@ const RefundForm = ({ onSubmit }) => { color="primary" fullWidth size="small" + disabled={disabled} > {T.translate("refund_form.queue_refund")} - + + {disabled ? ( + + ) : ( + + )} + ); }; diff --git a/src/i18n/en.json b/src/i18n/en.json index 86ac3d600..6d56f6adf 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -4203,7 +4203,8 @@ "reason": "Reason for Refund", "amount": "Amount", "queue_refund": "Queue refund", - "info": "If the original payment was made via Stripe, the refund will be automatically queued and processed." + "info": "If the original payment was made via Stripe, the refund will be automatically queued and processed.", + "only_online_payments": "Only online payments are eligible for refunds" }, "client_card": { "title": "Client & Address Details", diff --git a/src/layouts/sponsor-id-layout.js b/src/layouts/sponsor-id-layout.js index 991e6bf50..31211bf80 100644 --- a/src/layouts/sponsor-id-layout.js +++ b/src/layouts/sponsor-id-layout.js @@ -1,10 +1,24 @@ -import React, { Suspense } from "react"; +/** + * Copyright 2026 OpenStack Foundation + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * */ + +import React, { Suspense, useEffect } from "react"; import { connect } from "react-redux"; import T from "i18n-react/dist/i18n-react"; import { Breadcrumb } from "react-breadcrumbs"; -import { Switch, Route } from "react-router-dom"; +import { Route, Switch } from "react-router-dom"; import AjaxLoader from "openstack-uicore-foundation/lib/components/ajaxloader"; import { getSponsor, resetSponsorForm } from "../actions/sponsor-actions"; +import { INT_BASE } from "../utils/constants"; const SponsorPage = React.lazy(() => import("../pages/sponsors/sponsor-page")); const EditAdSponsorPage = React.lazy(() => @@ -21,149 +35,136 @@ const EditSponsorExtraQuestion = React.lazy(() => ); const NoMatchPage = React.lazy(() => import("../pages/no-match-page")); -class SponsorIdLayout extends React.Component { - constructor(props) { - const sponsorId = props.match.params.sponsor_id; - super(props); +const SponsorIdLayout = ({ + currentSponsor, + match, + resetSponsorForm, + getSponsor +}) => { + const sponsorId = match.params.sponsor_id; + useEffect(() => { if (!sponsorId) { - props.resetSponsorForm(); + resetSponsorForm(); } else { - props.getSponsor(sponsorId); - } - } - - componentDidUpdate(prevProps) { - const oldId = prevProps.match.params.sponsor_id; - const newId = this.props.match.params.sponsor_id; - - if (oldId !== newId) { - if (!newId) { - this.props.resetSponsorForm(); - } else { - this.props.getSponsor(newId); - } + getSponsor(sponsorId); } - } + }, [sponsorId]); - render() { - const { match, currentSponsor } = this.props; - const sponsorId = this.props.match.params.sponsor_id; - const breadcrumb = currentSponsor.id - ? currentSponsor.company?.name - : T.translate("general.new"); + if (!currentSponsor || parseInt(sponsorId, INT_BASE) !== currentSponsor.id) + return
; - if (sponsorId && !currentSponsor.id) return
; + const breadcrumb = currentSponsor.id + ? currentSponsor.company?.name + : T.translate("general.new"); - return ( -
- - }> - - ( -
- + + }> + + ( +
+ + + + + + +
+ )} + /> + ( +
+ + + + + + +
+ )} + /> + ( +
+ + + - - - - - -
- )} - /> - ( -
- - - - - - -
- )} - /> - ( -
- + +
+ )} + /> + ( +
+ + + - - - - - -
- )} - /> - ( -
- - - - - - -
- )} - /> - - -
-
-
- ); - } -} + +
+
+ )} + /> + + + + +
+ ); +}; -const mapStateToProps = ({ currentSponsorState, currentSummitState }) => ({ - currentSponsor: currentSponsorState.entity, - ...currentSummitState +const mapStateToProps = ({ currentSponsorState }) => ({ + currentSponsor: currentSponsorState.entity }); export default connect(mapStateToProps, { diff --git a/src/pages/sponsors/show-purchase-list-page/index.js b/src/pages/sponsors/show-purchase-list-page/index.js index 43f42d840..52538e8af 100644 --- a/src/pages/sponsors/show-purchase-list-page/index.js +++ b/src/pages/sponsors/show-purchase-list-page/index.js @@ -107,6 +107,7 @@ const ShowPurchaseListPage = ({ { columnKey: "purchased", header: T.translate("sponsor_show_purchases.purchased"), + width: 200, sortable: true }, { diff --git a/src/pages/sponsors/sponsor-page/tabs/sponsor-purchases-tab/sponsor-order-details.js b/src/pages/sponsors/sponsor-page/tabs/sponsor-purchases-tab/sponsor-order-details.js index 51c69db58..dfbfed236 100644 --- a/src/pages/sponsors/sponsor-page/tabs/sponsor-purchases-tab/sponsor-order-details.js +++ b/src/pages/sponsors/sponsor-page/tabs/sponsor-purchases-tab/sponsor-order-details.js @@ -27,7 +27,11 @@ import { updateClientAddress, updateClientInfo } from "../../../../../actions/sponsor-purchases-actions"; -import { ACCESS_ROUTES, DATE_FORMAT } from "../../../../../utils/constants"; +import { + ACCESS_ROUTES, + DATE_FORMAT, + PURCHASE_TYPES +} from "../../../../../utils/constants"; import Restrict from "../../../../../routes/restrict"; import { formatDate } from "../../../../../utils/methods"; import RefundForm from "../../../../../components/mui/RefundForm"; @@ -197,7 +201,10 @@ const SponsorOrderDetails = ({ "edit_sponsor.purchase_tab.order_details.issue_refund" )} - + diff --git a/src/utils/constants.js b/src/utils/constants.js index 7b21f1953..4b217d060 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -287,6 +287,11 @@ export const PURCHASE_METHODS = { INVOICE: "Invoice" }; +export const PURCHASE_TYPES = { + ONLINE: "Online", + OFFLINE: "Offline" +}; + export const SPONSOR_USER_ASSIGNMENT_TYPE = { EXISTING: "existing", NEW: "new" diff --git a/yarn.lock b/yarn.lock index baefb5da5..9d2de6210 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9056,10 +9056,10 @@ open@^10.0.3: is-inside-container "^1.0.0" wsl-utils "^0.1.0" -openstack-uicore-foundation@5.0.22: - version "5.0.22" - resolved "https://registry.npmjs.org/openstack-uicore-foundation/-/openstack-uicore-foundation-5.0.22.tgz#5e30b2d71fe854b08edc08a40723e8bc01f07423" - integrity sha512-vM+K8soybtHALLCIBPccwA3tFef9xxXGQqSCKOIahwgazVzgMHlt+2hM4cDUvenGkkHf/WNogDfNCumEryJ0/Q== +openstack-uicore-foundation@5.0.29-beta.0: + version "5.0.29-beta.0" + resolved "https://registry.yarnpkg.com/openstack-uicore-foundation/-/openstack-uicore-foundation-5.0.29-beta.0.tgz#828b8d0d6b1b6b8d4214322e32e47c1c5b3d0c68" + integrity sha512-N9ECX48OHfBfayeQkbbntWjGoVFozYXYGBE5XPGE6zxTgQXMH2RMZtLpQqrP/p2yHGnWBsYJlMchxecDDirIpw== optionator@^0.9.1: version "0.9.4"