feat: Integrate Data Connect and Implement Staff List View Directory

This commit is contained in:
dhinesh-m24
2026-01-31 16:54:59 +05:30
parent 48bb1c457c
commit cb25b33d04
255 changed files with 21425 additions and 109 deletions

View File

@@ -0,0 +1,44 @@
mutation createStaffAvailability(
$staffId: UUID!
$day: DayOfWeek!
$slot: AvailabilitySlot!
$status: AvailabilityStatus
$notes: String
) @auth(level: USER) {
staffAvailability_insert(
data: {
staffId: $staffId
day: $day
slot: $slot
status: $status
notes: $notes
}
)
}
mutation updateStaffAvailability(
$staffId: UUID!
$day: DayOfWeek!
$slot: AvailabilitySlot!
$status: AvailabilityStatus
$notes: String
) @auth(level: USER) {
staffAvailability_update(
key: { staffId: $staffId, day: $day, slot: $slot }
data: {
status: $status
notes: $notes
}
)
}
mutation deleteStaffAvailability(
$staffId: UUID!
$day: DayOfWeek!
$slot: AvailabilitySlot!
) @auth(level: USER) {
staffAvailability_delete(
key: { staffId: $staffId, day: $day, slot: $slot }
)
}

View File

@@ -0,0 +1,87 @@
query listStaffAvailabilities(
$offset: Int
$limit: Int
) @auth(level: USER) {
staffAvailabilities(offset: $offset, limit: $limit) {
id
staffId
day
slot
status
notes
createdAt
updatedAt
createdBy
staff { id fullName }
}
}
query listStaffAvailabilitiesByStaffId(
$staffId: UUID!
$offset: Int
$limit: Int
) @auth(level: USER) {
staffAvailabilities(
where: { staffId: { eq: $staffId } }
offset: $offset
limit: $limit
) {
id
staffId
day
slot
status
notes
createdAt
updatedAt
createdBy
staff { id fullName }
}
}
query getStaffAvailabilityByKey(
$staffId: UUID!
$day: DayOfWeek!
$slot: AvailabilitySlot!
) @auth(level: USER) {
staffAvailability(key: { staffId: $staffId, day: $day, slot: $slot }) {
id
staffId
day
slot
status
notes
createdAt
updatedAt
createdBy
staff { id fullName }
}
}
query listStaffAvailabilitiesByDay(
$day: DayOfWeek!
$offset: Int
$limit: Int
) @auth(level: USER) {
staffAvailabilities(
where: { day: { eq: $day } }
offset: $offset
limit: $limit
) {
id
staffId
day
slot
status
notes
createdAt
updatedAt
createdBy
staff { id fullName }
}
}