modifications queries, mutations of contact, recentPayment, shiftRole, teamhub

This commit is contained in:
José Salazar
2026-01-20 14:23:04 -05:00
parent 463c513a49
commit 4e09d21beb
9 changed files with 164 additions and 121 deletions

View File

@@ -348,3 +348,70 @@ query listRecentPaymentsByInvoiceIds(
}
}
}
# ------------------------------------------------------------
# LIST BY BUSINESS ID (direct)
# ------------------------------------------------------------
query listRecentPaymentsByBusinessId(
$businessId: UUID!
$offset: Int
$limit: Int
) @auth(level: USER) {
recentPayments(
where: {
invoice: {
businessId: { eq: $businessId }
}
}
offset: $offset
limit: $limit
orderBy: { createdAt: DESC }
) {
id
workedTime
status
staffId
applicationId
invoiceId
createdAt
updatedAt
createdBy
application {
id
staffId
checkInTime
checkOutTime
shiftRole {
startTime
endTime
hours
totalValue
role { id name costPerHour }
shift {
id
title
date
location
locationAddress
description
}
}
}
invoice {
id
invoiceNumber
status
issueDate
dueDate
amount
business { id businessName }
vendor { id companyName }
order { id eventName location }
}
}
}