new schema for taxForm
This commit is contained in:
@@ -1,45 +1,169 @@
|
||||
mutation createTaxForm(
|
||||
$formType: TaxFormType!
|
||||
$title: String!
|
||||
$subtitle: String
|
||||
$description: String
|
||||
$status: TaxFormStatus
|
||||
$firstName: String!
|
||||
$lastName: String!
|
||||
$mInitial: String
|
||||
$oLastName: String
|
||||
$dob: Timestamp
|
||||
$socialSN: Int!
|
||||
$email: String
|
||||
$phone: String
|
||||
$address: String!
|
||||
$city: String
|
||||
$apt: String
|
||||
$state: String
|
||||
$zipCode: String
|
||||
|
||||
# W-4
|
||||
$marital: MaritalStatus
|
||||
$multipleJob: Boolean
|
||||
$childrens: Int
|
||||
$otherDeps: Int
|
||||
$totalCredits: Float
|
||||
$otherInconme: Float
|
||||
$deductions: Float
|
||||
$extraWithholding: Float
|
||||
|
||||
# I-9
|
||||
$citizen: CitizenshipStatus
|
||||
$uscis: String
|
||||
$passportNumber: String
|
||||
$countryIssue: String
|
||||
$prepartorOrTranslator: Boolean
|
||||
|
||||
# both
|
||||
$signature: String
|
||||
$date: Timestamp
|
||||
|
||||
$status: TaxFormStatus!
|
||||
$staffId: UUID!
|
||||
$formData: Any
|
||||
$createdBy: String
|
||||
) @auth(level: USER) {
|
||||
taxForm_insert(
|
||||
data: {
|
||||
formType: $formType
|
||||
title: $title
|
||||
subtitle: $subtitle
|
||||
description: $description
|
||||
firstName: $firstName
|
||||
lastName: $lastName
|
||||
mInitial: $mInitial
|
||||
oLastName: $oLastName
|
||||
dob: $dob
|
||||
socialSN: $socialSN
|
||||
email: $email
|
||||
phone: $phone
|
||||
address: $address
|
||||
city: $city
|
||||
apt: $apt
|
||||
state: $state
|
||||
zipCode: $zipCode
|
||||
|
||||
marital: $marital
|
||||
multipleJob: $multipleJob
|
||||
childrens: $childrens
|
||||
otherDeps: $otherDeps
|
||||
totalCredits: $totalCredits
|
||||
otherInconme: $otherInconme
|
||||
deductions: $deductions
|
||||
extraWithholding: $extraWithholding
|
||||
|
||||
citizen: $citizen
|
||||
uscis: $uscis
|
||||
passportNumber: $passportNumber
|
||||
countryIssue: $countryIssue
|
||||
prepartorOrTranslator: $prepartorOrTranslator
|
||||
|
||||
signature: $signature
|
||||
date: $date
|
||||
|
||||
status: $status
|
||||
staffId: $staffId
|
||||
formData: $formData
|
||||
createdBy: $createdBy
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
mutation updateTaxForm(
|
||||
$id: UUID!
|
||||
|
||||
$formType: TaxFormType
|
||||
$firstName: String
|
||||
$lastName: String
|
||||
$mInitial: String
|
||||
$oLastName: String
|
||||
$dob: Timestamp
|
||||
$socialSN: Int
|
||||
$email: String
|
||||
$phone: String
|
||||
$address: String
|
||||
$city: String
|
||||
$apt: String
|
||||
$state: String
|
||||
$zipCode: String
|
||||
|
||||
# W-4
|
||||
$marital: MaritalStatus
|
||||
$multipleJob: Boolean
|
||||
$childrens: Int
|
||||
$otherDeps: Int
|
||||
$totalCredits: Float
|
||||
$otherInconme: Float
|
||||
$deductions: Float
|
||||
$extraWithholding: Float
|
||||
|
||||
# I-9
|
||||
$citizen: CitizenshipStatus
|
||||
$uscis: String
|
||||
$passportNumber: String
|
||||
$countryIssue: String
|
||||
$prepartorOrTranslator: Boolean
|
||||
|
||||
# both
|
||||
$signature: String
|
||||
$date: Timestamp
|
||||
|
||||
$status: TaxFormStatus
|
||||
$formData: Any
|
||||
$title: String
|
||||
$subtitle: String
|
||||
$description: String
|
||||
|
||||
) @auth(level: USER) {
|
||||
taxForm_update(
|
||||
id: $id
|
||||
data: {
|
||||
formType: $formType
|
||||
firstName: $firstName
|
||||
lastName: $lastName
|
||||
mInitial: $mInitial
|
||||
oLastName: $oLastName
|
||||
dob: $dob
|
||||
socialSN: $socialSN
|
||||
email: $email
|
||||
phone: $phone
|
||||
address: $address
|
||||
city: $city
|
||||
apt: $apt
|
||||
state: $state
|
||||
zipCode: $zipCode
|
||||
|
||||
marital: $marital
|
||||
multipleJob: $multipleJob
|
||||
childrens: $childrens
|
||||
otherDeps: $otherDeps
|
||||
totalCredits: $totalCredits
|
||||
otherInconme: $otherInconme
|
||||
deductions: $deductions
|
||||
extraWithholding: $extraWithholding
|
||||
|
||||
citizen: $citizen
|
||||
uscis: $uscis
|
||||
passportNumber: $passportNumber
|
||||
countryIssue: $countryIssue
|
||||
prepartorOrTranslator: $prepartorOrTranslator
|
||||
|
||||
signature: $signature
|
||||
date: $date
|
||||
|
||||
status: $status
|
||||
formData: $formData
|
||||
title: $title
|
||||
subtitle: $subtitle
|
||||
description: $description
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
mutation deleteTaxForm($id: UUID!) @auth(level: USER) {
|
||||
taxForm_delete(id: $id)
|
||||
taxForm_delete(id: $id)
|
||||
}
|
||||
|
||||
@@ -1,13 +1,47 @@
|
||||
query listTaxForms @auth(level: USER) {
|
||||
taxForms {
|
||||
|
||||
# ==========================================================
|
||||
# TAX FORM - QUERIES (USE where, NOT filter)
|
||||
# Include ALL fields from the new TaxForm type
|
||||
# ==========================================================
|
||||
|
||||
query listTaxForms($offset: Int, $limit: Int) @auth(level: USER) {
|
||||
taxForms(offset: $offset, limit: $limit, orderBy: { createdAt: DESC }) {
|
||||
id
|
||||
formType
|
||||
title
|
||||
subtitle
|
||||
description
|
||||
firstName
|
||||
lastName
|
||||
mInitial
|
||||
oLastName
|
||||
dob
|
||||
socialSN
|
||||
email
|
||||
phone
|
||||
address
|
||||
city
|
||||
apt
|
||||
state
|
||||
zipCode
|
||||
|
||||
marital
|
||||
multipleJob
|
||||
childrens
|
||||
otherDeps
|
||||
totalCredits
|
||||
otherInconme
|
||||
deductions
|
||||
extraWithholding
|
||||
|
||||
citizen
|
||||
uscis
|
||||
passportNumber
|
||||
countryIssue
|
||||
prepartorOrTranslator
|
||||
|
||||
signature
|
||||
date
|
||||
|
||||
status
|
||||
staffId
|
||||
formData
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
@@ -18,38 +52,105 @@ query getTaxFormById($id: UUID!) @auth(level: USER) {
|
||||
taxForm(id: $id) {
|
||||
id
|
||||
formType
|
||||
title
|
||||
subtitle
|
||||
description
|
||||
firstName
|
||||
lastName
|
||||
mInitial
|
||||
oLastName
|
||||
dob
|
||||
socialSN
|
||||
email
|
||||
phone
|
||||
address
|
||||
city
|
||||
apt
|
||||
state
|
||||
zipCode
|
||||
|
||||
marital
|
||||
multipleJob
|
||||
childrens
|
||||
otherDeps
|
||||
totalCredits
|
||||
otherInconme
|
||||
deductions
|
||||
extraWithholding
|
||||
|
||||
citizen
|
||||
uscis
|
||||
passportNumber
|
||||
countryIssue
|
||||
prepartorOrTranslator
|
||||
|
||||
signature
|
||||
date
|
||||
|
||||
status
|
||||
staffId
|
||||
formData
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
|
||||
query getTaxFormsBystaffId($staffId: UUID!) @auth(level: USER) {
|
||||
taxForms(where: { staffId: { eq: $staffId } }) {
|
||||
query getTaxFormsByStaffId(
|
||||
$staffId: UUID!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
taxForms(
|
||||
where: { staffId: { eq: $staffId } }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
orderBy: { createdAt: DESC }
|
||||
) {
|
||||
id
|
||||
formType
|
||||
title
|
||||
subtitle
|
||||
description
|
||||
firstName
|
||||
lastName
|
||||
mInitial
|
||||
oLastName
|
||||
dob
|
||||
socialSN
|
||||
email
|
||||
phone
|
||||
address
|
||||
city
|
||||
apt
|
||||
state
|
||||
zipCode
|
||||
|
||||
marital
|
||||
multipleJob
|
||||
childrens
|
||||
otherDeps
|
||||
totalCredits
|
||||
otherInconme
|
||||
deductions
|
||||
extraWithholding
|
||||
|
||||
citizen
|
||||
uscis
|
||||
passportNumber
|
||||
countryIssue
|
||||
prepartorOrTranslator
|
||||
|
||||
signature
|
||||
date
|
||||
|
||||
status
|
||||
staffId
|
||||
formData
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
|
||||
query filterTaxForms(
|
||||
query listTaxFormsWhere(
|
||||
$formType: TaxFormType
|
||||
$status: TaxFormStatus
|
||||
$staffId: UUID
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
taxForms(
|
||||
where: {
|
||||
@@ -57,11 +158,48 @@ query filterTaxForms(
|
||||
status: { eq: $status }
|
||||
staffId: { eq: $staffId }
|
||||
}
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
orderBy: { createdAt: DESC }
|
||||
) {
|
||||
id
|
||||
formType
|
||||
title
|
||||
firstName
|
||||
lastName
|
||||
mInitial
|
||||
oLastName
|
||||
dob
|
||||
socialSN
|
||||
email
|
||||
phone
|
||||
address
|
||||
city
|
||||
apt
|
||||
state
|
||||
zipCode
|
||||
|
||||
marital
|
||||
multipleJob
|
||||
childrens
|
||||
otherDeps
|
||||
totalCredits
|
||||
otherInconme
|
||||
deductions
|
||||
extraWithholding
|
||||
|
||||
citizen
|
||||
uscis
|
||||
passportNumber
|
||||
countryIssue
|
||||
prepartorOrTranslator
|
||||
|
||||
signature
|
||||
date
|
||||
|
||||
status
|
||||
staffId
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,15 +11,66 @@ enum TaxFormType {
|
||||
W4
|
||||
}
|
||||
|
||||
enum MaritalStatus{
|
||||
SINGLE
|
||||
MARRIED
|
||||
HEAD
|
||||
}
|
||||
|
||||
enum CitizenshipStatus{
|
||||
CITIZEN
|
||||
NONCITIZEN
|
||||
PERMANENT_RESIDENT
|
||||
ALIEN
|
||||
}
|
||||
|
||||
type TaxForm @table(name: "tax_forms") {
|
||||
id: UUID! @default(expr: "uuidV4()")
|
||||
|
||||
formType: TaxFormType!
|
||||
title: String!
|
||||
subtitle: String
|
||||
description: String
|
||||
firstName: String!
|
||||
lastName: String!
|
||||
mInitial: String
|
||||
oLastName:String
|
||||
dob: Timestamp
|
||||
socialSN: Int!
|
||||
email: String
|
||||
phone: String
|
||||
address: String!
|
||||
city: String
|
||||
apt: String
|
||||
state: String
|
||||
zipCode: String
|
||||
|
||||
# form W-4
|
||||
marital: MaritalStatus
|
||||
|
||||
multipleJob: Boolean @default(expr: "false")
|
||||
|
||||
childrens: Int
|
||||
otherDeps: Int
|
||||
totalCredits: Float @default(expr: "0")
|
||||
|
||||
otherInconme: Float @default(expr: "0")
|
||||
deductions: Float @default(expr: "0")
|
||||
extraWithholding: Float @default(expr: "0")
|
||||
|
||||
# form I-9
|
||||
|
||||
citizen: CitizenshipStatus
|
||||
|
||||
uscis: String
|
||||
passportNumber: String
|
||||
countryIssue: String
|
||||
|
||||
prepartorOrTranslator: Boolean @default(expr: "false")
|
||||
|
||||
# both forms
|
||||
signature:String
|
||||
date: Timestamp
|
||||
|
||||
status: TaxFormStatus!
|
||||
staffId: UUID!
|
||||
formData: Any
|
||||
|
||||
createdAt: Timestamp @default(expr: "request.time")
|
||||
updatedAt: Timestamp @default(expr: "request.time")
|
||||
|
||||
Reference in New Issue
Block a user