From aa450c7cbe925339e59bcedeeee0400469274953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Salazar?= <73718835+joshrs23@users.noreply.github.com> Date: Thu, 29 Jan 2026 15:17:34 -0500 Subject: [PATCH] adding hubid to order --- .../dataconnect/connector/order/mutations.gql | 16 ++--- .../dataconnect/connector/order/queries.gql | 70 +++++++++++++++---- backend/dataconnect/schema/order.gql | 5 +- 3 files changed, 67 insertions(+), 24 deletions(-) diff --git a/backend/dataconnect/connector/order/mutations.gql b/backend/dataconnect/connector/order/mutations.gql index be3ec3f6..6827d73a 100644 --- a/backend/dataconnect/connector/order/mutations.gql +++ b/backend/dataconnect/connector/order/mutations.gql @@ -2,7 +2,7 @@ mutation createOrder( $vendorId: UUID $businessId: UUID! $orderType: OrderType! - $location: String + #$location: String $status: OrderStatus $date: Timestamp $startDate: Timestamp @@ -14,7 +14,7 @@ mutation createOrder( $assignedStaff: Any $shifts: Any $requested: Int - $hub: String + $teamHubId: UUID! $recurringDays: Any $permanentStartDate: Timestamp $permanentDays: Any @@ -27,7 +27,7 @@ mutation createOrder( vendorId: $vendorId businessId: $businessId orderType: $orderType - location: $location + #location: $location status: $status date: $date startDate: $startDate @@ -39,7 +39,7 @@ mutation createOrder( assignedStaff: $assignedStaff shifts: $shifts requested: $requested - hub: $hub + teamHubId: $teamHubId recurringDays: $recurringDays permanentDays: $permanentDays notes: $notes @@ -53,7 +53,7 @@ mutation updateOrder( $id: UUID! $vendorId: UUID $businessId: UUID - $location: String + #$location: String $status: OrderStatus $date: Timestamp $startDate: Timestamp @@ -63,7 +63,7 @@ mutation updateOrder( $assignedStaff: Any $shifts: Any $requested: Int - $hub: String + $teamHubId: UUID! $recurringDays: Any $permanentDays: Any $notes: String @@ -75,7 +75,7 @@ mutation updateOrder( data: { vendorId: $vendorId businessId: $businessId - location: $location + #location: $location status: $status date: $date startDate: $startDate @@ -85,7 +85,7 @@ mutation updateOrder( assignedStaff: $assignedStaff shifts: $shifts requested: $requested - hub: $hub + teamHubId: $teamHubId recurringDays: $recurringDays permanentDays: $permanentDays notes: $notes diff --git a/backend/dataconnect/connector/order/queries.gql b/backend/dataconnect/connector/order/queries.gql index cad68e39..6fdbffcd 100644 --- a/backend/dataconnect/connector/order/queries.gql +++ b/backend/dataconnect/connector/order/queries.gql @@ -12,7 +12,7 @@ query listOrders( vendorId businessId orderType - location + #location status date startDate @@ -23,7 +23,6 @@ query listOrders( assignedStaff shifts requested - hub recurringDays permanentDays poReference @@ -42,6 +41,13 @@ query listOrders( id companyName } + + teamHub { + address + placeId + hubName + } + } } @@ -56,7 +62,7 @@ query getOrderById($id: UUID!) @auth(level: USER) { vendorId businessId orderType - location + #location status date startDate @@ -67,7 +73,6 @@ query getOrderById($id: UUID!) @auth(level: USER) { assignedStaff shifts requested - hub recurringDays permanentDays poReference @@ -86,6 +91,13 @@ query getOrderById($id: UUID!) @auth(level: USER) { id companyName } + + teamHub { + address + placeId + hubName + } + } } @@ -108,7 +120,7 @@ query getOrdersByBusinessId( vendorId businessId orderType - location + #location status date startDate @@ -119,7 +131,6 @@ query getOrdersByBusinessId( assignedStaff shifts requested - hub recurringDays permanentDays poReference @@ -138,6 +149,13 @@ query getOrdersByBusinessId( id companyName } + + teamHub { + address + placeId + hubName + } + } } @@ -160,7 +178,7 @@ query getOrdersByVendorId( vendorId businessId orderType - location + #location status date startDate @@ -171,7 +189,6 @@ query getOrdersByVendorId( assignedStaff shifts requested - hub recurringDays permanentDays poReference @@ -190,6 +207,13 @@ query getOrdersByVendorId( id companyName } + + teamHub { + address + placeId + hubName + } + } } @@ -212,7 +236,7 @@ query getOrdersByStatus( vendorId businessId orderType - location + #location status date startDate @@ -223,7 +247,6 @@ query getOrdersByStatus( assignedStaff shifts requested - hub recurringDays permanentDays poReference @@ -242,6 +265,13 @@ query getOrdersByStatus( id companyName } + + teamHub { + address + placeId + hubName + } + } } @@ -267,7 +297,7 @@ query getOrdersByDateRange( vendorId businessId orderType - location + #location status date startDate @@ -278,7 +308,6 @@ query getOrdersByDateRange( assignedStaff shifts requested - hub recurringDays permanentDays poReference @@ -297,6 +326,13 @@ query getOrdersByDateRange( id companyName } + + teamHub { + address + placeId + hubName + } + } } @@ -318,7 +354,7 @@ query getRapidOrders( vendorId businessId orderType - location + #location status date startDate @@ -329,7 +365,6 @@ query getRapidOrders( assignedStaff shifts requested - hub recurringDays permanentDays poReference @@ -348,5 +383,12 @@ query getRapidOrders( id companyName } + + teamHub { + address + placeId + hubName + } + } } diff --git a/backend/dataconnect/schema/order.gql b/backend/dataconnect/schema/order.gql index c0db5d79..16a60eac 100644 --- a/backend/dataconnect/schema/order.gql +++ b/backend/dataconnect/schema/order.gql @@ -33,7 +33,7 @@ type Order @table(name: "orders") { business: Business! @ref(fields: "businessId", references: "id") orderType: OrderType! - location: String + #location: String status: OrderStatus! @default(expr: "'DRAFT'") duration: OrderDuration lunchBreak: Int @@ -44,7 +44,8 @@ type Order @table(name: "orders") { shifts: Any @col(dataType: "jsonb") requested: Int - hub: String + teamHubId: UUID! + teamHub: TeamHub! @ref(fields: "teamHubId", references: "id") date: Timestamp