feat: Reorganize staff queries by removing old queries and adding new profile completion queries

This commit is contained in:
Achintha Isuru
2026-02-19 10:14:38 -05:00
parent 7b5c845134
commit c9c61411f3
2 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
# ==========================================================
# STAFF PROFILE COMPLETION - QUERIES
# ==========================================================
query getStaffProfileCompletion($id: UUID!) @auth(level: USER) {
staff(id: $id) {
id
fullName
email
phone
preferredLocations
industries
skills
}
emergencyContacts(where: { staffId: { eq: $id } }) {
id
}
taxForms(where: { staffId: { eq: $id } }) {
id
formType
status
}
}
query getStaffPersonalInfoCompletion($id: UUID!) @auth(level: USER) {
staff(id: $id) {
id
fullName
email
phone
preferredLocations
}
}
query getStaffEmergencyProfileCompletion($id: UUID!) @auth(level: USER) {
emergencyContacts(where: { staffId: { eq: $id } }) {
id
}
}
query getStaffExperienceProfileCompletion($id: UUID!) @auth(level: USER) {
staff(id: $id) {
id
industries
skills
}
}
query getStaffTaxFormsProfileCompletion($id: UUID!) @auth(level: USER) {
taxForms(where: { staffId: { eq: $id } }) {
id
formType
status
}
}

View File

@@ -0,0 +1,213 @@
query listStaff @auth(level: USER) {
staffs {
id
userId
fullName
level
role
phone
email
photoUrl
isProfileVisible
totalShifts
averageRating
onTimeRate
noShowCount
cancellationCount
reliabilityScore
xp
badges
isRecommended
bio
skills
industries
preferredLocations
maxDistanceMiles
languages
itemsAttire
ownerId
createdAt
department
hubId
manager
english
backgroundCheckStatus
employmentType
initial
englishRequired
city
addres
placeId
latitude
longitude
state
street
country
zipCode
}
}
query getStaffById($id: UUID!) @auth(level: USER) {
staff(id: $id) {
id
userId
fullName
role
level
phone
email
photoUrl
isProfileVisible
totalShifts
averageRating
onTimeRate
noShowCount
cancellationCount
reliabilityScore
xp
badges
isRecommended
bio
skills
industries
preferredLocations
maxDistanceMiles
languages
itemsAttire
ownerId
createdAt
updatedAt
createdBy
department
hubId
manager
english
backgroundCheckStatus
employmentType
initial
englishRequired
city
addres
placeId
latitude
longitude
state
street
country
zipCode
}
}
query getStaffByUserId($userId: String!) @auth(level: USER) {
staffs(where: { userId: { eq: $userId } }) {
id
userId
fullName
level
phone
email
photoUrl
isProfileVisible
totalShifts
averageRating
onTimeRate
noShowCount
cancellationCount
reliabilityScore
xp
badges
isRecommended
bio
skills
industries
preferredLocations
maxDistanceMiles
languages
itemsAttire
ownerId
createdAt
updatedAt
createdBy
department
hubId
manager
english
backgroundCheckStatus
employmentType
initial
englishRequired
city
addres
placeId
latitude
longitude
state
street
country
zipCode
}
}
query filterStaff(
$ownerId: UUID
$fullName: String
$level: String
$email: String
) @auth(level: USER) {
staffs(
where: {
ownerId: { eq: $ownerId }
fullName: { eq: $fullName }
level: { eq: $level }
email: { eq: $email }
}
) {
id
userId
fullName
level
phone
email
photoUrl
isProfileVisible
averageRating
reliabilityScore
totalShifts
ownerId
isRecommended
skills
industries
backgroundCheckStatus
employmentType
initial
englishRequired
city
addres
placeId
latitude
longitude
state
street
country
zipCode
}
}
query getStaffProfileVisibility($staffId: UUID!) @auth(level: USER) {
staff(id: $staffId) {
id
isProfileVisible
}
}