moving dataconnect to dev
This commit is contained in:
65
backend/dataconnect/connector/shiftRole/mutations.gql
Normal file
65
backend/dataconnect/connector/shiftRole/mutations.gql
Normal file
@@ -0,0 +1,65 @@
|
||||
mutation createShiftRole(
|
||||
$shiftId: UUID!
|
||||
$roleId: UUID!
|
||||
$count: Int!
|
||||
$assigned: Int
|
||||
$startTime: Timestamp
|
||||
$endTime: Timestamp
|
||||
$hours: Float
|
||||
$department: String
|
||||
$uniform: String
|
||||
$breakType: BreakDuration
|
||||
$totalValue: Float
|
||||
) @auth(level: USER) {
|
||||
shiftRole_insert(
|
||||
data: {
|
||||
shiftId: $shiftId
|
||||
roleId: $roleId
|
||||
count: $count
|
||||
assigned: $assigned
|
||||
startTime: $startTime
|
||||
endTime: $endTime
|
||||
hours: $hours
|
||||
department: $department
|
||||
uniform: $uniform
|
||||
breakType: $breakType
|
||||
totalValue: $totalValue
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation updateShiftRole(
|
||||
$shiftId: UUID!
|
||||
$roleId: UUID!
|
||||
$count: Int
|
||||
$assigned: Int
|
||||
$startTime: Timestamp
|
||||
$endTime: Timestamp
|
||||
$hours: Float
|
||||
$department: String
|
||||
$uniform: String
|
||||
$breakType: BreakDuration
|
||||
$totalValue: Float
|
||||
) @auth(level: USER) {
|
||||
shiftRole_update(
|
||||
key: { shiftId: $shiftId, roleId: $roleId }
|
||||
data: {
|
||||
count: $count
|
||||
assigned: $assigned
|
||||
startTime: $startTime
|
||||
endTime: $endTime
|
||||
hours: $hours
|
||||
department: $department
|
||||
uniform: $uniform
|
||||
breakType: $breakType
|
||||
totalValue: $totalValue
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation deleteShiftRole(
|
||||
$shiftId: UUID!
|
||||
$roleId: UUID!
|
||||
) @auth(level: USER) {
|
||||
shiftRole_delete(key: { shiftId: $shiftId, roleId: $roleId })
|
||||
}
|
||||
227
backend/dataconnect/connector/shiftRole/queries.gql
Normal file
227
backend/dataconnect/connector/shiftRole/queries.gql
Normal file
@@ -0,0 +1,227 @@
|
||||
|
||||
query getShiftRoleById(
|
||||
$shiftId: UUID!
|
||||
$roleId: UUID!
|
||||
) @auth(level: USER) {
|
||||
shiftRole(key: { shiftId: $shiftId, roleId: $roleId }) {
|
||||
id
|
||||
shiftId
|
||||
roleId
|
||||
count
|
||||
assigned
|
||||
startTime
|
||||
endTime
|
||||
hours
|
||||
department
|
||||
uniform
|
||||
breakType
|
||||
totalValue
|
||||
createdAt
|
||||
|
||||
role {
|
||||
id
|
||||
name
|
||||
costPerHour
|
||||
}
|
||||
|
||||
shift{
|
||||
location
|
||||
locationAddress
|
||||
description
|
||||
orderId
|
||||
|
||||
order{
|
||||
recurringDays
|
||||
permanentDays
|
||||
notes
|
||||
|
||||
business{
|
||||
id
|
||||
businessName
|
||||
}
|
||||
|
||||
vendor{
|
||||
id
|
||||
companyName
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query listShiftRolesByShiftId(
|
||||
$shiftId: UUID!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
shiftRoles(
|
||||
where: { shiftId: { eq: $shiftId } }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
) {
|
||||
id
|
||||
shiftId
|
||||
roleId
|
||||
count
|
||||
assigned
|
||||
startTime
|
||||
endTime
|
||||
hours
|
||||
department
|
||||
uniform
|
||||
breakType
|
||||
totalValue
|
||||
createdAt
|
||||
|
||||
role {
|
||||
id
|
||||
name
|
||||
costPerHour
|
||||
}
|
||||
|
||||
shift{
|
||||
location
|
||||
locationAddress
|
||||
description
|
||||
orderId
|
||||
|
||||
order{
|
||||
recurringDays
|
||||
permanentDays
|
||||
notes
|
||||
|
||||
business{
|
||||
id
|
||||
businessName
|
||||
}
|
||||
|
||||
vendor{
|
||||
id
|
||||
companyName
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query listShiftRolesByRoleId(
|
||||
$roleId: UUID!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
shiftRoles(
|
||||
where: { roleId: { eq: $roleId } }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
) {
|
||||
id
|
||||
shiftId
|
||||
roleId
|
||||
count
|
||||
assigned
|
||||
startTime
|
||||
endTime
|
||||
hours
|
||||
department
|
||||
uniform
|
||||
breakType
|
||||
totalValue
|
||||
createdAt
|
||||
|
||||
role {
|
||||
id
|
||||
name
|
||||
costPerHour
|
||||
}
|
||||
|
||||
shift{
|
||||
location
|
||||
locationAddress
|
||||
description
|
||||
orderId
|
||||
|
||||
order{
|
||||
recurringDays
|
||||
permanentDays
|
||||
notes
|
||||
|
||||
business{
|
||||
id
|
||||
businessName
|
||||
}
|
||||
|
||||
vendor{
|
||||
id
|
||||
companyName
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
query listShiftRolesByShiftIdAndTimeRange(
|
||||
$shiftId: UUID!
|
||||
$start: Timestamp!
|
||||
$end: Timestamp!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
shiftRoles(
|
||||
where: {
|
||||
shiftId: { eq: $shiftId }
|
||||
startTime: { ge: $start }
|
||||
endTime: { le: $end }
|
||||
}
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
) {
|
||||
id
|
||||
shiftId
|
||||
roleId
|
||||
count
|
||||
assigned
|
||||
startTime
|
||||
endTime
|
||||
hours
|
||||
department
|
||||
uniform
|
||||
breakType
|
||||
totalValue
|
||||
createdAt
|
||||
|
||||
role {
|
||||
id
|
||||
name
|
||||
costPerHour
|
||||
}
|
||||
|
||||
shift{
|
||||
location
|
||||
locationAddress
|
||||
description
|
||||
orderId
|
||||
|
||||
order{
|
||||
recurringDays
|
||||
permanentDays
|
||||
notes
|
||||
|
||||
business{
|
||||
id
|
||||
businessName
|
||||
}
|
||||
|
||||
vendor{
|
||||
id
|
||||
companyName
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user