From e36cb09b73e94e8296045252e9b174a2c7fa2f2c Mon Sep 17 00:00:00 2001 From: Gokulraj Date: Tue, 17 Feb 2026 16:53:21 +0530 Subject: [PATCH 1/2] Inconsistent Shift Booking Status --- apps/mobile/pubspec.lock | 32 ++--- .../dataconnect/connector/shift/mutations.gql | 134 ------------------ 2 files changed, 12 insertions(+), 154 deletions(-) delete mode 100644 backend/dataconnect/connector/shift/mutations.gql diff --git a/apps/mobile/pubspec.lock b/apps/mobile/pubspec.lock index 25c3fd23..f30d02fc 100644 --- a/apps/mobile/pubspec.lock +++ b/apps/mobile/pubspec.lock @@ -141,10 +141,10 @@ packages: dependency: transitive description: name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" charcode: dependency: transitive description: @@ -741,14 +741,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" - js: - dependency: transitive - description: - name: js - sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" - url: "https://pub.dev" - source: hosted - version: "0.7.2" json_annotation: dependency: transitive description: @@ -817,18 +809,18 @@ packages: dependency: transitive description: name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + sha256: "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6" url: "https://pub.dev" source: hosted - version: "0.12.17" + version: "0.12.18" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.13.0" melos: dependency: "direct dev" description: @@ -1326,26 +1318,26 @@ packages: dependency: transitive description: name: test - sha256: "75906bf273541b676716d1ca7627a17e4c4070a3a16272b7a3dc7da3b9f3f6b7" + sha256: "54c516bbb7cee2754d327ad4fca637f78abfc3cbcc5ace83b3eda117e42cd71a" url: "https://pub.dev" source: hosted - version: "1.26.3" + version: "1.29.0" test_api: dependency: transitive description: name: test_api - sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 + sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636" url: "https://pub.dev" source: hosted - version: "0.7.7" + version: "0.7.9" test_core: dependency: transitive description: name: test_core - sha256: "0cc24b5ff94b38d2ae73e1eb43cc302b77964fbf67abad1e296025b78deb53d0" + sha256: "394f07d21f0f2255ec9e3989f21e54d3c7dc0e6e9dbce160e5a9c1a6be0e2943" url: "https://pub.dev" source: hosted - version: "0.6.12" + version: "0.6.15" typed_data: dependency: transitive description: diff --git a/backend/dataconnect/connector/shift/mutations.gql b/backend/dataconnect/connector/shift/mutations.gql deleted file mode 100644 index 0a81f9bc..00000000 --- a/backend/dataconnect/connector/shift/mutations.gql +++ /dev/null @@ -1,134 +0,0 @@ - -mutation createShift( - $title: String! - $orderId: UUID! - - $date: Timestamp - $startTime: Timestamp - $endTime: Timestamp - $hours: Float - $cost: Float - - $location: String - $locationAddress: String - $latitude: Float - $longitude: Float - $placeId: String - $city: String - $state: String - $street: String - $country: String - $description: String - - $status: ShiftStatus - $workersNeeded: Int - $filled: Int - $filledAt: Timestamp - - $managers: [Any!] - $durationDays: Int - - $createdBy: String -) @auth(level: USER) { - shift_insert( - data: { - title: $title - orderId: $orderId - - date: $date - startTime: $startTime - endTime: $endTime - hours: $hours - cost: $cost - - location: $location - locationAddress: $locationAddress - latitude: $latitude - longitude: $longitude - placeId: $placeId - city: $city - state: $state - street: $street - country: $country - description: $description - - status: $status - workersNeeded: $workersNeeded - filled: $filled - filledAt: $filledAt - - managers: $managers - durationDays: $durationDays - } - ) -} - -mutation updateShift( - $id: UUID! - $title: String - $orderId: UUID - - $date: Timestamp - $startTime: Timestamp - $endTime: Timestamp - $hours: Float - $cost: Float - - $location: String - $locationAddress: String - $latitude: Float - $longitude: Float - $placeId: String - $city: String - $state: String - $street: String - $country: String - $description: String - - $status: ShiftStatus - $workersNeeded: Int - $filled: Int - $filledAt: Timestamp - - $managers: [Any!] - $durationDays: Int - -) @auth(level: USER) { - shift_update( - id: $id - data: { - title: $title - orderId: $orderId - - date: $date - startTime: $startTime - endTime: $endTime - hours: $hours - cost: $cost - - location: $location - locationAddress: $locationAddress - latitude: $latitude - longitude: $longitude - placeId: $placeId - city: $city - state: $state - street: $street - country: $country - description: $description - - status: $status - workersNeeded: $workersNeeded - filled: $filled - filledAt: $filledAt - - managers: $managers - durationDays: $durationDays - - } - ) -} - -mutation deleteShift($id: UUID!) @auth(level: USER) { - shift_delete(id: $id) -} From caec0d859b5f64cc048430c0685a9bcbe6b1ae1c Mon Sep 17 00:00:00 2001 From: Gokulraj Date: Tue, 17 Feb 2026 19:25:47 +0530 Subject: [PATCH 2/2] shift mutation file --- .../dataconnect/connector/shift/mutations.gql | 134 ++++++++++++++++++ internal/api-harness/src/api/krowSDK.js | 13 +- 2 files changed, 143 insertions(+), 4 deletions(-) create mode 100644 backend/dataconnect/connector/shift/mutations.gql diff --git a/backend/dataconnect/connector/shift/mutations.gql b/backend/dataconnect/connector/shift/mutations.gql new file mode 100644 index 00000000..0a81f9bc --- /dev/null +++ b/backend/dataconnect/connector/shift/mutations.gql @@ -0,0 +1,134 @@ + +mutation createShift( + $title: String! + $orderId: UUID! + + $date: Timestamp + $startTime: Timestamp + $endTime: Timestamp + $hours: Float + $cost: Float + + $location: String + $locationAddress: String + $latitude: Float + $longitude: Float + $placeId: String + $city: String + $state: String + $street: String + $country: String + $description: String + + $status: ShiftStatus + $workersNeeded: Int + $filled: Int + $filledAt: Timestamp + + $managers: [Any!] + $durationDays: Int + + $createdBy: String +) @auth(level: USER) { + shift_insert( + data: { + title: $title + orderId: $orderId + + date: $date + startTime: $startTime + endTime: $endTime + hours: $hours + cost: $cost + + location: $location + locationAddress: $locationAddress + latitude: $latitude + longitude: $longitude + placeId: $placeId + city: $city + state: $state + street: $street + country: $country + description: $description + + status: $status + workersNeeded: $workersNeeded + filled: $filled + filledAt: $filledAt + + managers: $managers + durationDays: $durationDays + } + ) +} + +mutation updateShift( + $id: UUID! + $title: String + $orderId: UUID + + $date: Timestamp + $startTime: Timestamp + $endTime: Timestamp + $hours: Float + $cost: Float + + $location: String + $locationAddress: String + $latitude: Float + $longitude: Float + $placeId: String + $city: String + $state: String + $street: String + $country: String + $description: String + + $status: ShiftStatus + $workersNeeded: Int + $filled: Int + $filledAt: Timestamp + + $managers: [Any!] + $durationDays: Int + +) @auth(level: USER) { + shift_update( + id: $id + data: { + title: $title + orderId: $orderId + + date: $date + startTime: $startTime + endTime: $endTime + hours: $hours + cost: $cost + + location: $location + locationAddress: $locationAddress + latitude: $latitude + longitude: $longitude + placeId: $placeId + city: $city + state: $state + street: $street + country: $country + description: $description + + status: $status + workersNeeded: $workersNeeded + filled: $filled + filledAt: $filledAt + + managers: $managers + durationDays: $durationDays + + } + ) +} + +mutation deleteShift($id: UUID!) @auth(level: USER) { + shift_delete(id: $id) +} diff --git a/internal/api-harness/src/api/krowSDK.js b/internal/api-harness/src/api/krowSDK.js index 7c9ec177..c47392ed 100644 --- a/internal/api-harness/src/api/krowSDK.js +++ b/internal/api-harness/src/api/krowSDK.js @@ -303,14 +303,19 @@ const dataconnectEntityConfig = { Order:{ list: 'listOrder', get: 'getOrderById', - create: 'UpdateOrder', - update: 'updateEnterprise', - delete: 'deleteEnterprise', + create: 'createOrder', + update: 'updateOrder', + delete: 'deleteOrder', filter: 'filterOrder', }, Shift:{ - + list: 'listShifts', + get: 'getShiftById', + create: 'createShift', + update: 'updateShift', + delete: 'deleteShift', + filter: 'filterShifts', } };