merge with dev

This commit is contained in:
José Salazar
2026-02-26 11:17:01 -05:00
parent f389b6de5b
commit 3cf791ddbf
8 changed files with 81 additions and 62 deletions

View File

@@ -1,5 +1,6 @@
mutation createTeamHub(
$teamId: UUID!
$costCenterId: UUID
$hubName: String!
$address: String!
@@ -20,6 +21,7 @@ mutation createTeamHub(
teamHub_insert(
data: {
teamId: $teamId
costCenterId: $costCenterId
hubName: $hubName
address: $address
@@ -45,6 +47,7 @@ mutation updateTeamHub(
$id: UUID!
$teamId: UUID
$costCenterId: UUID
$hubName: String
$address: String
@@ -67,6 +70,7 @@ mutation updateTeamHub(
id: $id
data: {
teamId: $teamId
costCenterId: $costCenterId
hubName: $hubName
address: $address
@@ -90,4 +94,25 @@ mutation updateTeamHub(
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
}
)
}

View File

@@ -8,6 +8,7 @@ query listTeamHubs($offset: Int, $limit: Int) @auth(level: USER) {
teamHubs(offset: $offset, limit: $limit, orderBy: { createdAt: DESC }) {
id
teamId
costCenterId
hubName
address
@@ -24,6 +25,11 @@ query listTeamHubs($offset: Int, $limit: Int) @auth(level: USER) {
managerName
isActive
departments
costCenter {
id
name
businessId
}
}
}
@@ -32,6 +38,7 @@ query getTeamHubById($id: UUID!) @auth(level: USER) {
teamHub(id: $id) {
id
teamId
costCenterId
hubName
address
@@ -48,6 +55,11 @@ query getTeamHubById($id: UUID!) @auth(level: USER) {
managerName
isActive
departments
costCenter {
id
name
businessId
}
}
}
@@ -65,6 +77,7 @@ query getTeamHubsByTeamId(
) {
id
teamId
costCenterId
hubName
address
@@ -81,6 +94,11 @@ query getTeamHubsByTeamId(
managerName
isActive
departments
costCenter {
id
name
businessId
}
}
}
@@ -105,6 +123,7 @@ query listTeamHubsByOwnerId(
) {
id
teamId
costCenterId
hubName
address
@@ -121,6 +140,11 @@ query listTeamHubsByOwnerId(
managerName
isActive
departments
costCenter {
id
name
businessId
}
}
}