From 03f8793e31ff5818891f37e00bbbfbb1c2348544 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Thu, 5 Mar 2026 16:22:30 -0500 Subject: [PATCH] Use teamHubs API and update pnpm workspace Switch CreateOrderDialog to the new team hubs API: replace useListHubs with useListTeamHubs, iterate hubsData.teamHubs, and show h.hubName in the Select. Also adjust pnpm configuration: add packages: ['.'] to pnpm-workspace.yaml and remove the overrides block from pnpm-lock.yaml (overrides moved into the workspace file). These changes align the UI with the updated dataconnect-generated API shape and correct the pnpm workspace setup. --- apps/web/pnpm-lock.yaml | 3 --- apps/web/pnpm-workspace.yaml | 3 +++ .../operations/orders/components/CreateOrderDialog.tsx | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/web/pnpm-lock.yaml b/apps/web/pnpm-lock.yaml index 6f3eca62..bd577ae8 100644 --- a/apps/web/pnpm-lock.yaml +++ b/apps/web/pnpm-lock.yaml @@ -4,9 +4,6 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -overrides: - '@dataconnect/generated': link:src/dataconnect-generated - importers: .: diff --git a/apps/web/pnpm-workspace.yaml b/apps/web/pnpm-workspace.yaml index 117a15bd..9410b45d 100644 --- a/apps/web/pnpm-workspace.yaml +++ b/apps/web/pnpm-workspace.yaml @@ -1,2 +1,5 @@ +packages: + - '.' + overrides: '@dataconnect/generated': link:src/dataconnect-generated diff --git a/apps/web/src/features/operations/orders/components/CreateOrderDialog.tsx b/apps/web/src/features/operations/orders/components/CreateOrderDialog.tsx index 718e6e82..763e1f81 100644 --- a/apps/web/src/features/operations/orders/components/CreateOrderDialog.tsx +++ b/apps/web/src/features/operations/orders/components/CreateOrderDialog.tsx @@ -6,7 +6,7 @@ import { DialogTitle, } from "@/common/components/ui/dialog"; import EventFormWizard from "./EventFormWizard"; -import { useCreateOrder, useListBusinesses, useListHubs } from "@/dataconnect-generated/react"; +import { useCreateOrder, useListBusinesses, useListTeamHubs } from "@/dataconnect-generated/react"; import { OrderType, OrderStatus } from "@/dataconnect-generated"; import { dataConnect } from "@/features/auth/firebase"; import { useToast } from "@/common/components/ui/use-toast"; @@ -26,7 +26,7 @@ export default function CreateOrderDialog({ open, onOpenChange }: CreateOrderDia const [selectedHubId, setSelectedHubId] = React.useState(""); const { data: businessesData } = useListBusinesses(dataConnect); - const { data: hubsData } = useListHubs(dataConnect); + const { data: hubsData } = useListTeamHubs(dataConnect); const createOrderMutation = useCreateOrder(dataConnect, { onSuccess: () => { @@ -109,9 +109,9 @@ export default function CreateOrderDialog({ open, onOpenChange }: CreateOrderDia - {hubsData?.hubs.map((h) => ( + {hubsData?.teamHubs.map((h) => ( - {h.name} + {h.hubName} ))}