119 lines
1.9 KiB
GraphQL
119 lines
1.9 KiB
GraphQL
mutation createTeamHub(
|
|
$teamId: UUID!
|
|
$costCenterId: UUID
|
|
$hubName: String!
|
|
$address: String!
|
|
|
|
$placeId: String
|
|
$latitude: Float
|
|
$longitude: Float
|
|
|
|
$city: String
|
|
$state: String
|
|
$street: String
|
|
$country: String
|
|
$zipCode: String
|
|
|
|
$managerName: String
|
|
$isActive: Boolean
|
|
$departments: Any
|
|
) @auth(level: USER) {
|
|
teamHub_insert(
|
|
data: {
|
|
teamId: $teamId
|
|
costCenterId: $costCenterId
|
|
hubName: $hubName
|
|
address: $address
|
|
|
|
placeId: $placeId
|
|
latitude: $latitude
|
|
longitude: $longitude
|
|
|
|
city: $city
|
|
state: $state
|
|
street: $street
|
|
country: $country
|
|
zipCode: $zipCode
|
|
|
|
managerName: $managerName
|
|
isActive: $isActive
|
|
departments: $departments
|
|
|
|
}
|
|
)
|
|
}
|
|
|
|
mutation updateTeamHub(
|
|
$id: UUID!
|
|
|
|
$teamId: UUID
|
|
$costCenterId: UUID
|
|
$hubName: String
|
|
$address: String
|
|
|
|
$placeId: String
|
|
$latitude: Float
|
|
$longitude: Float
|
|
|
|
$city: String
|
|
$state: String
|
|
$street: String
|
|
$country: String
|
|
$zipCode: String
|
|
|
|
$managerName: String
|
|
$isActive: Boolean
|
|
$departments: Any
|
|
|
|
) @auth(level: USER) {
|
|
teamHub_update(
|
|
id: $id
|
|
data: {
|
|
teamId: $teamId
|
|
costCenterId: $costCenterId
|
|
hubName: $hubName
|
|
address: $address
|
|
|
|
placeId: $placeId
|
|
latitude: $latitude
|
|
longitude: $longitude
|
|
|
|
city: $city
|
|
state: $state
|
|
street: $street
|
|
country: $country
|
|
zipCode: $zipCode
|
|
|
|
managerName: $managerName
|
|
isActive: $isActive
|
|
departments: $departments
|
|
|
|
}
|
|
)
|
|
}
|
|
|
|
mutation deleteTeamHub($id: UUID!) @auth(level: USER) {
|
|
teamHub_delete(id: $id)
|
|
}
|
|
|
|
mutation assignCostCenterToTeamHub(
|
|
$id: UUID!
|
|
$costCenterId: UUID!
|
|
) @auth(level: USER) {
|
|
teamHub_update(
|
|
id: $id
|
|
data: {
|
|
costCenterId: $costCenterId
|
|
}
|
|
)
|
|
}
|
|
|
|
mutation removeCostCenterFromTeamHub($id: UUID!) @auth(level: USER) {
|
|
teamHub_update(
|
|
id: $id
|
|
data: {
|
|
costCenterId: null
|
|
}
|
|
)
|
|
}
|