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.
This commit is contained in:
Achintha Isuru
2026-03-05 16:22:30 -05:00
parent 46b5d852dd
commit 03f8793e31
3 changed files with 7 additions and 7 deletions

View File

@@ -4,9 +4,6 @@ settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
overrides:
'@dataconnect/generated': link:src/dataconnect-generated
importers:
.:

View File

@@ -1,2 +1,5 @@
packages:
- '.'
overrides:
'@dataconnect/generated': link:src/dataconnect-generated

View File

@@ -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<string>("");
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
<SelectValue placeholder="Select Hub" />
</SelectTrigger>
<SelectContent>
{hubsData?.hubs.map((h) => (
{hubsData?.teamHubs.map((h) => (
<SelectItem key={h.id} value={h.id}>
{h.name}
{h.hubName}
</SelectItem>
))}
</SelectContent>