From 04bffcea373125ebeb4da5ec4871a064dc76f214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Salazar?= <73718835+joshrs23@users.noreply.github.com> Date: Tue, 2 Dec 2025 09:18:01 -0500 Subject: [PATCH] new version of staff for the actual front --- dataconnect/connector/staff/mutations.gql | 8 ++++++++ dataconnect/connector/staff/queries.gql | 6 ++++++ dataconnect/schema/staff.gql | 20 +++++++++++--------- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/dataconnect/connector/staff/mutations.gql b/dataconnect/connector/staff/mutations.gql index 20d26162..64f2954a 100644 --- a/dataconnect/connector/staff/mutations.gql +++ b/dataconnect/connector/staff/mutations.gql @@ -12,9 +12,11 @@ mutation CreateStaff( $profileType: ProfileType, $employmentType: EmploymentType!, $english: EnglishLevel, + $rate: Float, $rating: Float, $reliabilityScore: Int, $backgroundCheckStatus: BackgroundCheckStatus! + $notes: String ) @auth(level: USER) { staff_insert( data: { @@ -31,9 +33,11 @@ mutation CreateStaff( profileType: $profileType employmentType: $employmentType english: $english + rate: $rate rating: $rating reliabilityScore: $reliabilityScore backgroundCheckStatus: $backgroundCheckStatus + notes: $notes } ) } @@ -53,9 +57,11 @@ mutation UpdateStaff( $profileType: ProfileType, $employmentType: EmploymentType, $english: EnglishLevel, + $rate: Float, $rating: Float, $reliabilityScore: Int, $backgroundCheckStatus: BackgroundCheckStatus + $notes: String ) @auth(level: USER) { staff_update( id: $id, @@ -73,9 +79,11 @@ mutation UpdateStaff( profileType: $profileType employmentType: $employmentType english: $english + rate: $rate rating: $rating reliabilityScore: $reliabilityScore backgroundCheckStatus: $backgroundCheckStatus + notes: $notes } ) } diff --git a/dataconnect/connector/staff/queries.gql b/dataconnect/connector/staff/queries.gql index da35030a..87ed5235 100644 --- a/dataconnect/connector/staff/queries.gql +++ b/dataconnect/connector/staff/queries.gql @@ -14,9 +14,11 @@ query listStaff @auth(level: USER) { profileType employmentType english + rate rating reliabilityScore backgroundCheckStatus + notes } } @@ -38,9 +40,11 @@ query getStaffById( profileType employmentType english + rate rating reliabilityScore backgroundCheckStatus + notes } } @@ -70,8 +74,10 @@ query filterStaff( position employmentType english + rate rating reliabilityScore backgroundCheckStatus + notes } } diff --git a/dataconnect/schema/staff.gql b/dataconnect/schema/staff.gql index 3a0bab4e..a4aaf878 100644 --- a/dataconnect/schema/staff.gql +++ b/dataconnect/schema/staff.gql @@ -42,22 +42,24 @@ enum BackgroundCheckStatus { type Staff @table(name: "staffs") { id: UUID! @default(expr: "uuidV4()") - employeeName: String! - vendorId: UUID # vendor_id (FK lógica a Vendor.id) - vendorName: String + employeeName: String! @col(name: "employee_name") + vendorId: UUID @col(name: "vendor_id") # vendor_id (FK lógica a Vendor.id) + vendorName: String @col(name: "vendor_name") manager: String - contactNumber: String + contactNumber: String @col(name: "contact_number") email: String department: StaffDepartment - hubLocation: String + hubLocation: String @col(name: "hub_location") track: String position: String - profileType: ProfileType - employmentType: EmploymentType! + profileType: ProfileType @col(name: "profile_type") + employmentType: EmploymentType! @col(name: "employment_type") english: EnglishLevel + rate: Float rating: Float - reliabilityScore: Int - backgroundCheckStatus: BackgroundCheckStatus! # background_check_status + reliabilityScore: Int @col(name: "reliability_score") + backgroundCheckStatus: BackgroundCheckStatus! @col(name: "background_check_status") + notes: String createdDate: Timestamp @default(expr: "request.time") updatedDate: Timestamp @default(expr: "request.time") createdBy: String @default(expr: "auth.uid")