spending in home view working
This commit is contained in:
@@ -464,3 +464,63 @@ query listShiftRolesByBusinessAndDatesSummary(
|
||||
role { id name }
|
||||
}
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# BUSINESS: GET COMPLETED SHIFTS FOR A BUSINESS (via order.businessId)
|
||||
# ------------------------------------------------------------
|
||||
#for spending insights in home view
|
||||
query getCompletedShiftsByBusinessId(
|
||||
$businessId: UUID!
|
||||
$dateFrom: Timestamp!
|
||||
$dateTo: Timestamp!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
shifts(
|
||||
where: {
|
||||
order: { businessId: { eq: $businessId } }
|
||||
status: {in: [IN_PROGRESS, CONFIRMED, COMPLETED, OPEN]}
|
||||
date: { ge: $dateFrom, le: $dateTo }
|
||||
}
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
) {
|
||||
id
|
||||
#title
|
||||
|
||||
#orderId
|
||||
|
||||
date
|
||||
startTime
|
||||
endTime
|
||||
hours
|
||||
cost
|
||||
|
||||
#location
|
||||
#locationAddress
|
||||
#latitude
|
||||
#longitude
|
||||
#description
|
||||
|
||||
#status
|
||||
workersNeeded
|
||||
filled
|
||||
#filledAt
|
||||
|
||||
#managers
|
||||
#durationDays
|
||||
|
||||
createdAt
|
||||
|
||||
order {
|
||||
#id
|
||||
#eventName
|
||||
status
|
||||
#orderType
|
||||
#businessId
|
||||
#vendorId
|
||||
#business { id businessName email contactName }
|
||||
#vendor { id companyName }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user