brakedown by week and month

This commit is contained in:
José Salazar
2026-01-26 17:51:30 -05:00
parent f65121a26f
commit fd06391e63
19 changed files with 18566 additions and 17804 deletions

View File

@@ -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 }
}
}