feat: Integrate Data Connect and Implement Staff List View Directory
This commit is contained in:
45
apps/web/dataconnect/connector/taxForm/mutations.gql
Normal file
45
apps/web/dataconnect/connector/taxForm/mutations.gql
Normal file
@@ -0,0 +1,45 @@
|
||||
mutation createTaxForm(
|
||||
$formType: TaxFormType!
|
||||
$title: String!
|
||||
$subtitle: String
|
||||
$description: String
|
||||
$status: TaxFormStatus
|
||||
$staffId: UUID!
|
||||
$formData: Any
|
||||
) @auth(level: USER) {
|
||||
taxForm_insert(
|
||||
data: {
|
||||
formType: $formType
|
||||
title: $title
|
||||
subtitle: $subtitle
|
||||
description: $description
|
||||
status: $status
|
||||
staffId: $staffId
|
||||
formData: $formData
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation updateTaxForm(
|
||||
$id: UUID!
|
||||
$status: TaxFormStatus
|
||||
$formData: Any
|
||||
$title: String
|
||||
$subtitle: String
|
||||
$description: String
|
||||
) @auth(level: USER) {
|
||||
taxForm_update(
|
||||
id: $id
|
||||
data: {
|
||||
status: $status
|
||||
formData: $formData
|
||||
title: $title
|
||||
subtitle: $subtitle
|
||||
description: $description
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation deleteTaxForm($id: UUID!) @auth(level: USER) {
|
||||
taxForm_delete(id: $id)
|
||||
}
|
||||
67
apps/web/dataconnect/connector/taxForm/queries.gql
Normal file
67
apps/web/dataconnect/connector/taxForm/queries.gql
Normal file
@@ -0,0 +1,67 @@
|
||||
query listTaxForms @auth(level: USER) {
|
||||
taxForms {
|
||||
id
|
||||
formType
|
||||
title
|
||||
subtitle
|
||||
description
|
||||
status
|
||||
staffId
|
||||
formData
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
|
||||
query getTaxFormById($id: UUID!) @auth(level: USER) {
|
||||
taxForm(id: $id) {
|
||||
id
|
||||
formType
|
||||
title
|
||||
subtitle
|
||||
description
|
||||
status
|
||||
staffId
|
||||
formData
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
|
||||
query getTaxFormsBystaffId($staffId: UUID!) @auth(level: USER) {
|
||||
taxForms(where: { staffId: { eq: $staffId } }) {
|
||||
id
|
||||
formType
|
||||
title
|
||||
subtitle
|
||||
description
|
||||
status
|
||||
staffId
|
||||
formData
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
|
||||
query filterTaxForms(
|
||||
$formType: TaxFormType
|
||||
$status: TaxFormStatus
|
||||
$staffId: UUID
|
||||
) @auth(level: USER) {
|
||||
taxForms(
|
||||
where: {
|
||||
formType: { eq: $formType }
|
||||
status: { eq: $status }
|
||||
staffId: { eq: $staffId }
|
||||
}
|
||||
) {
|
||||
id
|
||||
formType
|
||||
title
|
||||
status
|
||||
staffId
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user