fix(dashboard): refund payment formatting (#12476)

* fix(dashboard): refund payment formatting

* fix: reduce SC pagination limit
This commit is contained in:
Frane Polić
2025-05-19 15:49:34 +02:00
committed by GitHub
parent dd66720404
commit b8ab053252
3 changed files with 10 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@medusajs/dashboard": patch
---
fix(dashboard): refund payment formatting
@@ -22,6 +22,7 @@ import { formatCurrency } from "../../../../../lib/format-currency"
import { getLocaleAmount } from "../../../../../lib/money-amount-helpers" import { getLocaleAmount } from "../../../../../lib/money-amount-helpers"
import { getPaymentsFromOrder } from "../../../order-detail/components/order-payment-section" import { getPaymentsFromOrder } from "../../../order-detail/components/order-payment-section"
import { formatValue } from "react-currency-input-field" import { formatValue } from "react-currency-input-field"
import { formatProvider } from "../../../../../lib/format-provider"
type CreateRefundFormProps = { type CreateRefundFormProps = {
order: HttpTypes.AdminOrder order: HttpTypes.AdminOrder
@@ -140,6 +141,7 @@ export const CreateRefundForm = ({
disabled={ disabled={
!!payment.canceled_at || totalRefunded >= payment.amount !!payment.canceled_at || totalRefunded >= payment.amount
} }
className="flex items-center justify-center"
> >
<span> <span>
{getLocaleAmount( {getLocaleAmount(
@@ -148,8 +150,8 @@ export const CreateRefundForm = ({
)} )}
{" - "} {" - "}
</span> </span>
<span>{payment.provider_id}</span> <span>{formatProvider(payment.provider_id)}</span>
<span> - ({payment.id.replace("pay_", "")})</span> <span> - (#{payment.id.substring(23)})</span>
</Select.Item> </Select.Item>
) )
})} })}
@@ -23,7 +23,7 @@ type ProductCreateSalesChannelStackedModalProps = {
form: UseFormReturn<ProductCreateSchemaType> form: UseFormReturn<ProductCreateSchemaType>
} }
const PAGE_SIZE = 50 const PAGE_SIZE = 20
export const ProductCreateSalesChannelStackedModal = ({ export const ProductCreateSalesChannelStackedModal = ({
form, form,