brakedown by week and month
This commit is contained in:
@@ -435,3 +435,30 @@ query listShiftRolesByBusinessDateRangeCompletedOrders(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#view for billing period
|
||||
query listShiftRolesByBusinessAndDatesSummary(
|
||||
$businessId: UUID!
|
||||
$start: Timestamp!
|
||||
$end: Timestamp!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
shiftRoles(
|
||||
where: {
|
||||
shift: {
|
||||
date: { ge: $start, le: $end }
|
||||
status: { eq: COMPLETED }
|
||||
order: { businessId: { eq: $businessId } }
|
||||
}
|
||||
}
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
orderBy: { createdAt: DESC }
|
||||
) {
|
||||
roleId
|
||||
hours
|
||||
totalValue
|
||||
role { id name }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user