update staff entity schema and crud
This commit is contained in:
@@ -1,25 +1,87 @@
|
||||
mutation CreateStaff(
|
||||
$employeeName: String!,
|
||||
$vendorId: UUID,
|
||||
$vendorName: String,
|
||||
$manager: String,
|
||||
$contactNumber: String,
|
||||
$email: String,
|
||||
$department: StaffDepartment,
|
||||
$hubLocation: String,
|
||||
$track: String,
|
||||
$position: String,
|
||||
$profileType: ProfileType,
|
||||
$employmentType: EmploymentType!,
|
||||
$english: EnglishLevel,
|
||||
$rating: Float,
|
||||
$reliabilityScore: Int,
|
||||
$backgroundCheckStatus: BackgroundCheckStatus!,
|
||||
$certifications: String
|
||||
$backgroundCheckStatus: BackgroundCheckStatus!
|
||||
) @auth(level: USER) {
|
||||
staff_insert(
|
||||
data: {
|
||||
employeeName: $employeeName
|
||||
vendorId: $vendorId
|
||||
vendorName: $vendorName
|
||||
manager: $manager
|
||||
contactNumber: $contactNumber
|
||||
email: $email
|
||||
department: $department
|
||||
hubLocation: $hubLocation
|
||||
track: $track
|
||||
position: $position
|
||||
profileType: $profileType
|
||||
employmentType: $employmentType
|
||||
english: $english
|
||||
rating: $rating
|
||||
reliabilityScore: $reliabilityScore
|
||||
backgroundCheckStatus: $backgroundCheckStatus
|
||||
certifications: $certifications
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation UpdateStaff(
|
||||
$id: UUID!,
|
||||
$employeeName: String,
|
||||
$vendorId: UUID,
|
||||
$vendorName: String,
|
||||
$manager: String,
|
||||
$contactNumber: String,
|
||||
$email: String,
|
||||
$department: StaffDepartment,
|
||||
$hubLocation: String,
|
||||
$track: String,
|
||||
$position: String,
|
||||
$profileType: ProfileType,
|
||||
$employmentType: EmploymentType,
|
||||
$english: EnglishLevel,
|
||||
$rating: Float,
|
||||
$reliabilityScore: Int,
|
||||
$backgroundCheckStatus: BackgroundCheckStatus
|
||||
) @auth(level: USER) {
|
||||
staff_update(
|
||||
id: $id,
|
||||
data: {
|
||||
employeeName: $employeeName
|
||||
vendorId: $vendorId
|
||||
vendorName: $vendorName
|
||||
manager: $manager
|
||||
contactNumber: $contactNumber
|
||||
email: $email
|
||||
department: $department
|
||||
hubLocation: $hubLocation
|
||||
track: $track
|
||||
position: $position
|
||||
profileType: $profileType
|
||||
employmentType: $employmentType
|
||||
english: $english
|
||||
rating: $rating
|
||||
reliabilityScore: $reliabilityScore
|
||||
backgroundCheckStatus: $backgroundCheckStatus
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation DeleteStaff(
|
||||
$id: UUID!
|
||||
) @auth(level: USER) {
|
||||
staff_delete(id: $id)
|
||||
}
|
||||
|
||||
@@ -3,12 +3,75 @@ query listStaff @auth(level: USER) {
|
||||
id
|
||||
employeeName
|
||||
vendorId
|
||||
vendorName
|
||||
manager
|
||||
contactNumber
|
||||
email
|
||||
department
|
||||
hubLocation
|
||||
track
|
||||
position
|
||||
profileType
|
||||
employmentType
|
||||
english
|
||||
rating
|
||||
reliabilityScore
|
||||
backgroundCheckStatus
|
||||
}
|
||||
}
|
||||
|
||||
query getStaffById(
|
||||
$id: UUID!
|
||||
) @auth(level: USER) {
|
||||
staff(id: $id) {
|
||||
id
|
||||
employeeName
|
||||
vendorId
|
||||
vendorName
|
||||
manager
|
||||
contactNumber
|
||||
email
|
||||
department
|
||||
hubLocation
|
||||
track
|
||||
position
|
||||
profileType
|
||||
employmentType
|
||||
english
|
||||
rating
|
||||
reliabilityScore
|
||||
backgroundCheckStatus
|
||||
}
|
||||
}
|
||||
|
||||
query filterStaff(
|
||||
$employeeName: String,
|
||||
$vendorId: UUID,
|
||||
$department: StaffDepartment,
|
||||
$employmentType: EmploymentType,
|
||||
$english: EnglishLevel,
|
||||
$backgroundCheckStatus: BackgroundCheckStatus
|
||||
) @auth(level: USER) {
|
||||
staffs(
|
||||
where: {
|
||||
employeeName: { eq: $employeeName }
|
||||
vendorId: { eq: $vendorId }
|
||||
department: { eq: $department }
|
||||
employmentType: { eq: $employmentType }
|
||||
english: { eq: $english }
|
||||
backgroundCheckStatus: { eq: $backgroundCheckStatus }
|
||||
}
|
||||
) {
|
||||
id
|
||||
employeeName
|
||||
vendorId
|
||||
vendorName
|
||||
department
|
||||
position
|
||||
employmentType
|
||||
english
|
||||
rating
|
||||
reliabilityScore
|
||||
backgroundCheckStatus
|
||||
certifications
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user