new version of staff for the actual front

This commit is contained in:
José Salazar
2025-12-02 09:18:01 -05:00
parent d2c227c9d5
commit 04bffcea37
3 changed files with 25 additions and 9 deletions

View File

@@ -12,9 +12,11 @@ mutation CreateStaff(
$profileType: ProfileType, $profileType: ProfileType,
$employmentType: EmploymentType!, $employmentType: EmploymentType!,
$english: EnglishLevel, $english: EnglishLevel,
$rate: Float,
$rating: Float, $rating: Float,
$reliabilityScore: Int, $reliabilityScore: Int,
$backgroundCheckStatus: BackgroundCheckStatus! $backgroundCheckStatus: BackgroundCheckStatus!
$notes: String
) @auth(level: USER) { ) @auth(level: USER) {
staff_insert( staff_insert(
data: { data: {
@@ -31,9 +33,11 @@ mutation CreateStaff(
profileType: $profileType profileType: $profileType
employmentType: $employmentType employmentType: $employmentType
english: $english english: $english
rate: $rate
rating: $rating rating: $rating
reliabilityScore: $reliabilityScore reliabilityScore: $reliabilityScore
backgroundCheckStatus: $backgroundCheckStatus backgroundCheckStatus: $backgroundCheckStatus
notes: $notes
} }
) )
} }
@@ -53,9 +57,11 @@ mutation UpdateStaff(
$profileType: ProfileType, $profileType: ProfileType,
$employmentType: EmploymentType, $employmentType: EmploymentType,
$english: EnglishLevel, $english: EnglishLevel,
$rate: Float,
$rating: Float, $rating: Float,
$reliabilityScore: Int, $reliabilityScore: Int,
$backgroundCheckStatus: BackgroundCheckStatus $backgroundCheckStatus: BackgroundCheckStatus
$notes: String
) @auth(level: USER) { ) @auth(level: USER) {
staff_update( staff_update(
id: $id, id: $id,
@@ -73,9 +79,11 @@ mutation UpdateStaff(
profileType: $profileType profileType: $profileType
employmentType: $employmentType employmentType: $employmentType
english: $english english: $english
rate: $rate
rating: $rating rating: $rating
reliabilityScore: $reliabilityScore reliabilityScore: $reliabilityScore
backgroundCheckStatus: $backgroundCheckStatus backgroundCheckStatus: $backgroundCheckStatus
notes: $notes
} }
) )
} }

View File

@@ -14,9 +14,11 @@ query listStaff @auth(level: USER) {
profileType profileType
employmentType employmentType
english english
rate
rating rating
reliabilityScore reliabilityScore
backgroundCheckStatus backgroundCheckStatus
notes
} }
} }
@@ -38,9 +40,11 @@ query getStaffById(
profileType profileType
employmentType employmentType
english english
rate
rating rating
reliabilityScore reliabilityScore
backgroundCheckStatus backgroundCheckStatus
notes
} }
} }
@@ -70,8 +74,10 @@ query filterStaff(
position position
employmentType employmentType
english english
rate
rating rating
reliabilityScore reliabilityScore
backgroundCheckStatus backgroundCheckStatus
notes
} }
} }

View File

@@ -42,22 +42,24 @@ enum BackgroundCheckStatus {
type Staff @table(name: "staffs") { type Staff @table(name: "staffs") {
id: UUID! @default(expr: "uuidV4()") id: UUID! @default(expr: "uuidV4()")
employeeName: String! employeeName: String! @col(name: "employee_name")
vendorId: UUID # vendor_id (FK lógica a Vendor.id) vendorId: UUID @col(name: "vendor_id") # vendor_id (FK lógica a Vendor.id)
vendorName: String vendorName: String @col(name: "vendor_name")
manager: String manager: String
contactNumber: String contactNumber: String @col(name: "contact_number")
email: String email: String
department: StaffDepartment department: StaffDepartment
hubLocation: String hubLocation: String @col(name: "hub_location")
track: String track: String
position: String position: String
profileType: ProfileType profileType: ProfileType @col(name: "profile_type")
employmentType: EmploymentType! employmentType: EmploymentType! @col(name: "employment_type")
english: EnglishLevel english: EnglishLevel
rate: Float
rating: Float rating: Float
reliabilityScore: Int reliabilityScore: Int @col(name: "reliability_score")
backgroundCheckStatus: BackgroundCheckStatus! # background_check_status backgroundCheckStatus: BackgroundCheckStatus! @col(name: "background_check_status")
notes: String
createdDate: Timestamp @default(expr: "request.time") createdDate: Timestamp @default(expr: "request.time")
updatedDate: Timestamp @default(expr: "request.time") updatedDate: Timestamp @default(expr: "request.time")
createdBy: String @default(expr: "auth.uid") createdBy: String @default(expr: "auth.uid")