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:
@@ -443,11 +443,12 @@ medusaIntegrationTestRunner({
|
||||
amount: 106,
|
||||
payments: [
|
||||
expect.objectContaining({
|
||||
// canceled_at: expect.any(String),
|
||||
canceled_at: null,
|
||||
refunds: [
|
||||
expect.objectContaining({
|
||||
id: expect.any(String),
|
||||
amount: 106,
|
||||
created_by: expect.any(String),
|
||||
}),
|
||||
],
|
||||
captures: [
|
||||
@@ -488,11 +489,9 @@ medusaIntegrationTestRunner({
|
||||
})
|
||||
)
|
||||
|
||||
const response = await api.post(
|
||||
`/admin/orders/${order.id}/cancel`,
|
||||
{},
|
||||
adminHeaders
|
||||
)
|
||||
const response = await api
|
||||
.post(`/admin/orders/${order.id}/cancel`, {}, adminHeaders)
|
||||
.catch((e) => e)
|
||||
|
||||
expect(response.status).toBe(200)
|
||||
expect(response.data.order).toEqual(
|
||||
@@ -514,11 +513,11 @@ medusaIntegrationTestRunner({
|
||||
amount: 106,
|
||||
payments: [
|
||||
expect.objectContaining({
|
||||
// canceled_at: expect.any(String),
|
||||
refunds: [
|
||||
expect.objectContaining({
|
||||
id: expect.any(String),
|
||||
amount: 50,
|
||||
created_by: expect.any(String),
|
||||
}),
|
||||
],
|
||||
captures: [
|
||||
|
||||
Reference in New Issue
Block a user