feat: create return reason (#8516)

* feat: create and edit return reasons

* add prop to hide data table header

* make return reasons searchable

* hide table header
This commit is contained in:
Christian authored and GitHub committed 2024-08-12 07:47:07 +02:00
1 parent a19c562bec
commit 4eb2e8379f
18 files changed
+482 -82

No files matched your search

@@ -1,6 +1,7 @@
import { DAL } from "@medusajs/types"
import {
DALUtils,
Searchable,
createPsqlIndexStatementHelper,
generateEntityId,
} from "@medusajs/utils"
@@ -46,10 +47,12 @@ export default class ReturnReason {
@PrimaryKey({ columnType: "text" })
id: string
@Searchable()
@Property({ columnType: "text" })
@ValueIndex.MikroORMIndex()
value: string
@Searchable()
@Property({ columnType: "text" })
label: string
@@ -67,7 +70,7 @@ export default class ReturnReason {
cascade: [Cascade.PERSIST],
})
parent_return_reason?: Rel<ReturnReason> | null
Searchable
@OneToMany(
() => ReturnReason,
(return_reason) => return_reason.parent_return_reason,