fix(dashboard, core-flows): improvements to order page on canceled orders (#10888)

what:

- Remove pending payment for canceled orders
- Hide unfulfilled items for canceled orders
- Disable non refundable payments from being refunded
- Populate refund created_by
- Disable order edit when canceled
- Fix bug https://github.com/medusajs/medusa/issues/10852

RESOLVES CMRC-842
This commit is contained in:
Riqwan Thamir
2025-01-13 17:51:38 +01:00
committed by GitHub
parent 7232a8a930
commit 1758bfb8d0
9 changed files with 77 additions and 61 deletions

View File

@@ -1,13 +1,13 @@
import { cancelOrderWorkflow } from "@medusajs/core-flows"
import {
AuthenticatedMedusaRequest,
MedusaResponse,
} from "@medusajs/framework/http"
import { HttpTypes } from "@medusajs/framework/types"
import {
ContainerRegistrationKeys,
remoteQueryObjectFromString,
} from "@medusajs/framework/utils"
import {
AuthenticatedMedusaRequest,
MedusaResponse,
} from "@medusajs/framework/http"
export const POST = async (
req: AuthenticatedMedusaRequest,
@@ -33,5 +33,6 @@ export const POST = async (
})
const [order] = await remoteQuery(queryObject)
res.status(200).json({ order })
}