Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"moment-duration-format": "^2.3.2",
"moment-timezone": "^0.5.33",
"mui-color-input": "^9.0.0",
"openstack-uicore-foundation": "v5.0.52-beta.0",
"openstack-uicore-foundation": "5.0.53-beta.2",
"p-limit": "^6.1.0",
"path-browserify": "^1.0.1",
"postcss-loader": "^6.2.1",
Expand Down
8 changes: 4 additions & 4 deletions src/actions/sponsor-purchases-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const SPONSOR_CLIENT_ADDRESS_UPDATED = "SPONSOR_CLIENT_ADDRESS_UPDATED";
export const SPONSOR_CLIENT_UPDATED = "SPONSOR_CLIENT_UPDATED";

const ORDER_DETAIL_EXPAND =
"forms,forms.items,forms.items.meta_fields,forms.items.type,refunds,payments,notes,fees";
"forms,forms.items,forms.items.meta_fields,forms.items.type,forms.items.cancellations,refunds,payments,notes,fees";

export const getAllSponsorPurchases =
(
Expand Down Expand Up @@ -442,7 +442,8 @@ export const updateClientInfo =
};

export const cancelSponsorForm =
(orderId, lineId, lineName) => async (dispatch, getState) => {
(orderId, lineId, lineName, quantity, reason) =>
async (dispatch, getState) => {
const { currentSummitState, currentSponsorState } = getState();
const { currentSummit } = currentSummitState;
const { entity: sponsor } = currentSponsorState;
Expand All @@ -458,7 +459,7 @@ export const cancelSponsorForm =
null,
createAction(DUMMY_ACTION),
`${window.PURCHASES_API_URL}/api/v1/summits/${currentSummit.id}/sponsors/${sponsor.id}/purchases/${orderId}/lines/${lineId}/cancel`,
null,
{ quantity, reason },
snackbarErrorHandler
)(params)(dispatch)
.then(() => {
Expand All @@ -472,7 +473,6 @@ export const cancelSponsorForm =
})
);
})
.catch(console.log) // need to catch promise reject
.finally(() => {
dispatch(stopLoading());
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,11 @@ const SponsorOrderDetails = ({
updateClientAddress(currentOrder.id, values);
};

const handleCancelForm = (item) => {
cancelSponsorForm(currentOrder.id, item.id, item.name);
};
const handleCancelForm = (item, quantity, reason) =>
cancelSponsorForm(currentOrder.id, item.id, item.name, quantity, reason);

const handleUndoCancelForm = (item) => {
const handleUndoCancelForm = (item) =>
undoCancelSponsorForm(currentOrder.id, item.id);
};

const handleOrderRefund = (values) => {
refundSponsorOrder(currentOrder.id, values.amount, values.reason);
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9042,10 +9042,10 @@ open@^10.0.3:
is-inside-container "^1.0.0"
wsl-utils "^0.1.0"

openstack-uicore-foundation@v5.0.52-beta.0:
version "5.0.52-beta.0"
resolved "https://registry.npmjs.org/openstack-uicore-foundation/-/openstack-uicore-foundation-5.0.52-beta.0.tgz#934a563f19bd5be953e3f865a72609339a3a2d5d"
integrity sha512-8dAUk6pd1ppFA8sWjs+JLT0wd+HZpIwzq1+tmxQpnb4rzHQyI6OFBMkX7klzRwxhrdYhd22ve9n4i4EsaZqlYw==
openstack-uicore-foundation@5.0.53-beta.2:
version "5.0.53-beta.2"
resolved "https://registry.yarnpkg.com/openstack-uicore-foundation/-/openstack-uicore-foundation-5.0.53-beta.2.tgz#9f8fb560d154dc1d2a2a6a5e40ff06c664afc6b4"
integrity sha512-VMA0Q5p3AXpW3OrWz9LAMBQyB0VfOZOsanjGTTmU7awJfhqtcCosTlajFJcv1XJqxsWMijIoHyHGS+MRx/SPBw==
dependencies:
use-sync-external-store "^1.6.0"

Expand Down
Loading