fix: Add free text search on reservations (#9621)

This commit is contained in:
Oli Juhl authored and GitHub committed 2024-10-17 10:21:24 +02:00
1 parent df78f6e871
commit 0be50059f2
3 files changed
+89 -1

No files matched your search

@@ -18,6 +18,7 @@ export const AdminGetReservationsParams = createFindParams({
offset: 0,
}).merge(
z.object({
q: z.string().optional(),
location_id: z.union([z.string(), z.array(z.string())]).optional(),
inventory_item_id: z.union([z.string(), z.array(z.string())]).optional(),
line_item_id: z.union([z.string(), z.array(z.string())]).optional(),
@@ -14,6 +14,7 @@ import {
BigNumber,
DALUtils,
MikroOrmBigNumberProperty,
Searchable,
createPsqlIndexStatementHelper,
generateEntityId,
} from "@medusajs/framework/utils"
@@ -87,6 +88,7 @@ export class ReservationItem {
@Property({ type: "text", nullable: true })
external_id: string | null = null
@Searchable()
@Property({ type: "text", nullable: true })
description: string | null = null
@@ -105,6 +107,7 @@ export class ReservationItem {
})
inventory_item_id: string
@Searchable()
@ManyToOne(() => InventoryItem, {
persist: false,
})