Skip to content

Commit 52becfd

Browse files
authored
fix(dashboard,types): loyalty UI changes (medusajs#12764)
1 parent a7a264b commit 52becfd

File tree

2 files changed

+2
-42
lines changed

2 files changed

+2
-42
lines changed

packages/admin/dashboard/src/routes/orders/order-balance-settlement/components/order-balance-settlement-form/order-balance-settlement-form.tsx

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ const OrderBalanceSettlementSchema = zod.object({
4040
credit_line: zod
4141
.object({
4242
amount: zod.string().or(zod.number()).optional(),
43-
reference: zod.string().optional(),
44-
reference_id: zod.string().optional(),
4543
note: zod.string().optional(),
4644
})
4745
.optional(),
@@ -84,8 +82,6 @@ export const OrderBalanceSettlementForm = ({
8482
await createCreditLine(
8583
{
8684
amount: parseFloat(data.credit_line!.amount! as string) * -1,
87-
reference: data.credit_line!.reference ?? "order",
88-
reference_id: data.credit_line!.reference_id ?? order.id,
8985
},
9086
{
9187
onSuccess: () => {
@@ -332,42 +328,6 @@ export const OrderBalanceSettlementForm = ({
332328
)
333329
}}
334330
/>
335-
336-
<Form.Field
337-
control={form.control}
338-
name="credit_line.reference"
339-
render={({ field }) => {
340-
return (
341-
<Form.Item>
342-
<Form.Label>{t("fields.reference")}</Form.Label>
343-
344-
<Form.Control>
345-
<Input {...field} />
346-
</Form.Control>
347-
348-
<Form.ErrorMessage />
349-
</Form.Item>
350-
)
351-
}}
352-
/>
353-
354-
<Form.Field
355-
control={form.control}
356-
name="credit_line.reference_id"
357-
render={({ field }) => {
358-
return (
359-
<Form.Item>
360-
<Form.Label>{t("fields.reference_id")}</Form.Label>
361-
362-
<Form.Control>
363-
<Input {...field} />
364-
</Form.Control>
365-
366-
<Form.ErrorMessage />
367-
</Form.Item>
368-
)
369-
}}
370-
/>
371331
</>
372332
)}
373333
</div>

packages/core/types/src/order/mutations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2297,12 +2297,12 @@ export interface CreateOrderCreditLineDTO {
22972297
/**
22982298
* The reference model name that the credit line is generated from
22992299
*/
2300-
reference: string | null
2300+
reference?: string | null
23012301

23022302
/**
23032303
* The reference model id that the credit line is generated from
23042304
*/
2305-
reference_id: string | null
2305+
reference_id?: string | null
23062306

23072307
/**
23082308
* The metadata of the order detail

0 commit comments

Comments
 (0)