feat: Integrate Data Connect and Implement Staff List View Directory
This commit is contained in:
99
backend/dataconnect/example/vendor/mutations.gql
vendored
Normal file
99
backend/dataconnect/example/vendor/mutations.gql
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
mutation createVendor(
|
||||
$userId: String!
|
||||
$companyName: String!
|
||||
$email: String
|
||||
$phone: String
|
||||
$photoUrl: String
|
||||
$address: String
|
||||
$billingAddress: String
|
||||
$timezone: String
|
||||
$legalName: String
|
||||
$doingBusinessAs: String
|
||||
$region: String
|
||||
$state: String
|
||||
$city: String
|
||||
$serviceSpecialty: String
|
||||
$approvalStatus: ApprovalStatus
|
||||
$isActive: Boolean
|
||||
$markup: Float
|
||||
$fee: Float
|
||||
$csat: Float
|
||||
$tier: VendorTier
|
||||
) @auth(level: USER) {
|
||||
vendor_insert(
|
||||
data: {
|
||||
userId: $userId
|
||||
companyName: $companyName
|
||||
email: $email
|
||||
phone: $phone
|
||||
photoUrl: $photoUrl
|
||||
address: $address
|
||||
billingAddress: $billingAddress
|
||||
timezone: $timezone
|
||||
legalName: $legalName
|
||||
doingBusinessAs: $doingBusinessAs
|
||||
region: $region
|
||||
state: $state
|
||||
city: $city
|
||||
serviceSpecialty: $serviceSpecialty
|
||||
approvalStatus: $approvalStatus
|
||||
isActive: $isActive
|
||||
markup: $markup
|
||||
fee: $fee
|
||||
csat: $csat
|
||||
tier: $tier
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation updateVendor(
|
||||
$id: UUID!
|
||||
$companyName: String
|
||||
$email: String
|
||||
$phone: String
|
||||
$photoUrl: String
|
||||
$address: String
|
||||
$billingAddress: String
|
||||
$timezone: String
|
||||
$legalName: String
|
||||
$doingBusinessAs: String
|
||||
$region: String
|
||||
$state: String
|
||||
$city: String
|
||||
$serviceSpecialty: String
|
||||
$approvalStatus: ApprovalStatus
|
||||
$isActive: Boolean
|
||||
$markup: Float
|
||||
$fee: Float
|
||||
$csat: Float
|
||||
$tier: VendorTier
|
||||
) @auth(level: USER) {
|
||||
vendor_update(
|
||||
id: $id
|
||||
data: {
|
||||
companyName: $companyName
|
||||
email: $email
|
||||
phone: $phone
|
||||
photoUrl: $photoUrl
|
||||
address: $address
|
||||
billingAddress: $billingAddress
|
||||
timezone: $timezone
|
||||
legalName: $legalName
|
||||
doingBusinessAs: $doingBusinessAs
|
||||
region: $region
|
||||
state: $state
|
||||
city: $city
|
||||
serviceSpecialty: $serviceSpecialty
|
||||
approvalStatus: $approvalStatus
|
||||
isActive: $isActive
|
||||
markup: $markup
|
||||
fee: $fee
|
||||
csat: $csat
|
||||
tier: $tier
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation deleteVendor($id: UUID!) @auth(level: USER) {
|
||||
vendor_delete(id: $id)
|
||||
}
|
||||
86
backend/dataconnect/example/vendor/queries.gql
vendored
Normal file
86
backend/dataconnect/example/vendor/queries.gql
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
query getVendorById($id: UUID!) @auth(level: USER) {
|
||||
vendor(id: $id) {
|
||||
id
|
||||
userId
|
||||
companyName
|
||||
email
|
||||
phone
|
||||
photoUrl
|
||||
address
|
||||
billingAddress
|
||||
timezone
|
||||
legalName
|
||||
doingBusinessAs
|
||||
region
|
||||
state
|
||||
city
|
||||
serviceSpecialty
|
||||
approvalStatus
|
||||
isActive
|
||||
markup
|
||||
fee
|
||||
csat
|
||||
tier
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
|
||||
query getVendorByUserId($userId: String!) @auth(level: USER) {
|
||||
vendors(where: { userId: { eq: $userId } }) {
|
||||
id
|
||||
userId
|
||||
companyName
|
||||
email
|
||||
phone
|
||||
photoUrl
|
||||
address
|
||||
billingAddress
|
||||
timezone
|
||||
legalName
|
||||
doingBusinessAs
|
||||
region
|
||||
state
|
||||
city
|
||||
serviceSpecialty
|
||||
approvalStatus
|
||||
isActive
|
||||
markup
|
||||
fee
|
||||
csat
|
||||
tier
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
|
||||
query listVendors @auth(level: USER) {
|
||||
vendors {
|
||||
id
|
||||
userId
|
||||
companyName
|
||||
email
|
||||
phone
|
||||
photoUrl
|
||||
address
|
||||
billingAddress
|
||||
timezone
|
||||
legalName
|
||||
doingBusinessAs
|
||||
region
|
||||
state
|
||||
city
|
||||
serviceSpecialty
|
||||
approvalStatus
|
||||
isActive
|
||||
markup
|
||||
fee
|
||||
csat
|
||||
tier
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user