fix: Merge conflicts resolved in backend folder

This commit is contained in:
dhinesh-m24
2026-02-04 11:37:30 +05:30
parent 599890c58d
commit fcb1ddbbb3
7 changed files with 825 additions and 26 deletions

View File

@@ -16,11 +16,20 @@ query listApplications @auth(level: USER) {
date
startTime
endTime
location
status
order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
business {
id
businessName
@@ -70,11 +79,20 @@ query getApplicationById($id: UUID!) @auth(level: USER) {
date
startTime
endTime
location
status
order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
business {
id
businessName
@@ -125,11 +143,20 @@ query getApplicationsByShiftId($shiftId: UUID!) @auth(level: USER) {
date
startTime
endTime
location
status
order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
business {
id
businessName
@@ -193,11 +220,20 @@ query getApplicationsByShiftIdAndStatus(
date
startTime
endTime
location
status
order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
business {
id
businessName
@@ -233,9 +269,18 @@ query getApplicationsByStaffId(
$staffId: UUID!
$offset: Int
$limit: Int
$dayStart: Timestamp
$dayEnd: Timestamp
) @auth(level: USER) {
applications(
where: { staffId: { eq: $staffId } }
where: {
staffId: { eq: $staffId }
status: { in: [ACCEPTED, CONFIRMED, CHECKED_IN, CHECKED_OUT, LATE] }
shift: {
date: { ge: $dayStart, le: $dayEnd }
}
}
offset: $offset
limit: $limit
) {
@@ -255,16 +300,30 @@ query getApplicationsByStaffId(
date
startTime
endTime
location
status
durationDays
description
latitude
longitude
order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
business {
id
businessName
email
contactName
companyLogoUrl
}
vendor {
id
@@ -293,6 +352,170 @@ query getApplicationsByStaffId(
}
}
query vaidateDayStaffApplication(
$staffId: UUID!
$offset: Int
$limit: Int
$dayStart: Timestamp
$dayEnd: Timestamp
) @auth(level: USER) {
applications(
where: {
staffId: { eq: $staffId }
shift: {
date: { ge: $dayStart, le: $dayEnd }
}
}
offset: $offset
limit: $limit
) {
id
shiftId
staffId
status
appliedAt
checkInTime
checkOutTime
origin
createdAt
shift {
id
title
date
startTime
endTime
location
status
durationDays
description
order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
business {
id
businessName
email
contactName
companyLogoUrl
}
vendor {
id
companyName
}
}
}
shiftRole {
id
roleId
count
assigned
startTime
endTime
hours
totalValue
role {
id
name
costPerHour
}
}
}
}
#validation before apply
query getApplicationByStaffShiftAndRole(
$staffId: UUID!
$shiftId: UUID!
$roleId: UUID!
$offset: Int
$limit: Int
) @auth(level: USER) {
applications(
where: {
staffId: { eq: $staffId }
shiftId: { eq: $shiftId }
shiftRole: { roleId: { eq: $roleId } }
}
offset: $offset
limit: $limit
) {
id
shiftId
staffId
status
appliedAt
checkInTime
checkOutTime
origin
createdAt
shift {
id
title
date
startTime
endTime
location
status
order {
id
eventName
teamHub {
address
placeId
hubName
}
business {
id
businessName
email
contactName
companyLogoUrl
}
vendor {
id
companyName
}
}
}
shiftRole {
id
roleId
count
assigned
startTime
endTime
hours
totalValue
role {
id
name
costPerHour
}
}
}
}
#getting staffs of an shiftrole ACCEPTED for orders view client
query listAcceptedApplicationsByShiftRoleKey(
$shiftId: UUID!
@@ -327,7 +550,8 @@ query listAcceptedApplicationsByBusinessForDay(
) @auth(level: USER) {
applications(
where: {
status: { eq: ACCEPTED }
#status: { eq: ACCEPTED }
status: { in: [ACCEPTED, CONFIRMED, CHECKED_IN, CHECKED_OUT, LATE] }
shift: {
date: { ge: $dayStart, le: $dayEnd }
order: { businessId: { eq: $businessId } }
@@ -343,7 +567,7 @@ query listAcceptedApplicationsByBusinessForDay(
checkInTime
checkOutTime
appliedAt
staff { id fullName email phone photoUrl }
staff { id fullName email phone photoUrl averageRating }
}
}
@@ -378,10 +602,12 @@ query listStaffsApplicationsByBusinessForDay(
shiftRole{
shift{
location
cost
}
count
assigned
hours
role{
name
@@ -389,4 +615,89 @@ query listStaffsApplicationsByBusinessForDay(
}
staff { id fullName email phone photoUrl }
}
}
# ==========================================================
# COMPLETED APPLICATIONS BY STAFF (same payload as
# getApplicationByStaffShiftAndRole)
# ==========================================================
query listCompletedApplicationsByStaffId(
$staffId: UUID!
$offset: Int
$limit: Int
) @auth(level: USER) {
applications(
where: {
staffId: { eq: $staffId }
status: { eq: COMPLETED }
}
offset: $offset
limit: $limit
orderBy: { appliedAt: DESC }
) {
id
shiftId
staffId
status
appliedAt
checkInTime
checkOutTime
origin
createdAt
shift {
id
title
date
startTime
endTime
location
status
description
durationDays
order {
id
eventName
teamHub {
address
placeId
hubName
}
business {
id
businessName
email
contactName
companyLogoUrl
}
vendor {
id
companyName
}
}
}
shiftRole {
id
roleId
count
assigned
startTime
endTime
hours
totalValue
role {
id
name
costPerHour
}
}
}
}

View File

@@ -2,6 +2,7 @@ mutation createOrder(
$vendorId: UUID
$businessId: UUID!
$orderType: OrderType!
#$location: String
$status: OrderStatus
$date: Timestamp
$startDate: Timestamp
@@ -13,6 +14,7 @@ mutation createOrder(
$assignedStaff: Any
$shifts: Any
$requested: Int
$teamHubId: UUID!
$recurringDays: Any
$permanentStartDate: Timestamp
$permanentDays: Any
@@ -25,6 +27,7 @@ mutation createOrder(
vendorId: $vendorId
businessId: $businessId
orderType: $orderType
#location: $location
status: $status
date: $date
startDate: $startDate
@@ -36,6 +39,7 @@ mutation createOrder(
assignedStaff: $assignedStaff
shifts: $shifts
requested: $requested
teamHubId: $teamHubId
recurringDays: $recurringDays
permanentDays: $permanentDays
notes: $notes
@@ -49,6 +53,7 @@ mutation updateOrder(
$id: UUID!
$vendorId: UUID
$businessId: UUID
#$location: String
$status: OrderStatus
$date: Timestamp
$startDate: Timestamp
@@ -58,6 +63,7 @@ mutation updateOrder(
$assignedStaff: Any
$shifts: Any
$requested: Int
$teamHubId: UUID!
$recurringDays: Any
$permanentDays: Any
$notes: String
@@ -69,6 +75,7 @@ mutation updateOrder(
data: {
vendorId: $vendorId
businessId: $businessId
#location: $location
status: $status
date: $date
startDate: $startDate
@@ -78,6 +85,7 @@ mutation updateOrder(
assignedStaff: $assignedStaff
shifts: $shifts
requested: $requested
teamHubId: $teamHubId
recurringDays: $recurringDays
permanentDays: $permanentDays
notes: $notes
@@ -89,4 +97,4 @@ mutation updateOrder(
mutation deleteOrder($id: UUID!) @auth(level: USER) {
order_delete(id: $id)
}
}

View File

@@ -12,6 +12,7 @@ query listOrders(
vendorId
businessId
orderType
#location
status
date
startDate
@@ -40,6 +41,13 @@ query listOrders(
id
companyName
}
teamHub {
address
placeId
hubName
}
}
}
@@ -54,6 +62,7 @@ query getOrderById($id: UUID!) @auth(level: USER) {
vendorId
businessId
orderType
#location
status
date
startDate
@@ -82,6 +91,13 @@ query getOrderById($id: UUID!) @auth(level: USER) {
id
companyName
}
teamHub {
address
placeId
hubName
}
}
}
@@ -104,6 +120,7 @@ query getOrdersByBusinessId(
vendorId
businessId
orderType
#location
status
date
startDate
@@ -132,6 +149,13 @@ query getOrdersByBusinessId(
id
companyName
}
teamHub {
address
placeId
hubName
}
}
}
@@ -154,6 +178,7 @@ query getOrdersByVendorId(
vendorId
businessId
orderType
#location
status
date
startDate
@@ -182,6 +207,13 @@ query getOrdersByVendorId(
id
companyName
}
teamHub {
address
placeId
hubName
}
}
}
@@ -204,6 +236,7 @@ query getOrdersByStatus(
vendorId
businessId
orderType
#location
status
date
startDate
@@ -232,6 +265,13 @@ query getOrdersByStatus(
id
companyName
}
teamHub {
address
placeId
hubName
}
}
}
@@ -257,6 +297,7 @@ query getOrdersByDateRange(
vendorId
businessId
orderType
#location
status
date
startDate
@@ -285,6 +326,13 @@ query getOrdersByDateRange(
id
companyName
}
teamHub {
address
placeId
hubName
}
}
}
@@ -306,6 +354,7 @@ query getRapidOrders(
vendorId
businessId
orderType
#location
status
date
startDate
@@ -334,5 +383,53 @@ query getRapidOrders(
id
companyName
}
teamHub {
address
placeId
hubName
}
}
}
#to validate if an hub has orders before delete
query listOrdersByBusinessAndTeamHub(
$businessId: UUID!
$teamHubId: UUID!
$offset: Int
$limit: Int
) @auth(level: USER) {
orders(
where: {
businessId: { eq: $businessId }
teamHubId: { eq: $teamHubId }
#status: {in: [ DRAFT POSTED FILLED PENDING FULLY_STAFFED PARTIAL_STAFFED ] }
}
offset: $offset
limit: $limit
orderBy: { createdAt: DESC }
) {
id
eventName
orderType
status
duration
businessId
vendorId
teamHubId
date
startDate
endDate
requested
total
notes
createdAt
updatedAt
createdBy
}
}

View File

@@ -34,6 +34,7 @@ query listRecentPayments(
shift {
title
date
location
locationAddress
description
}
@@ -85,6 +86,7 @@ query getRecentPaymentById($id: UUID!) @auth(level: USER) {
shift {
title
date
location
locationAddress
description
}
@@ -157,7 +159,18 @@ query listRecentPaymentsByStaffId(
business { id businessName }
vendor { id companyName }
order { id eventName }
order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
}
}
}
}
@@ -203,7 +216,18 @@ query listRecentPaymentsByApplicationId(
amount
business { id businessName }
vendor { id companyName }
order { id eventName }
order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
}
}
}
}
@@ -249,7 +273,18 @@ query listRecentPaymentsByInvoiceId(
amount
business { id businessName }
vendor { id companyName }
order { id eventName }
order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
}
}
}
}
@@ -295,7 +330,18 @@ query listRecentPaymentsByStatus(
amount
business { id businessName }
vendor { id companyName }
order { id eventName }
order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
}
}
}
}
@@ -342,7 +388,18 @@ query listRecentPaymentsByInvoiceIds(
amount
business { id businessName }
vendor { id companyName }
order { id eventName }
order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
}
}
}
}
@@ -392,6 +449,7 @@ query listRecentPaymentsByBusinessId(
id
title
date
location
locationAddress
description
}
@@ -408,7 +466,18 @@ query listRecentPaymentsByBusinessId(
business { id businessName }
vendor { id companyName }
order { id eventName }
order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
}
}
}
}
}

View File

@@ -25,6 +25,7 @@ query getShiftRoleById(
}
shift{
location
locationAddress
description
orderId
@@ -37,6 +38,7 @@ query getShiftRoleById(
business{
id
businessName
companyLogoUrl
}
vendor{
@@ -44,6 +46,10 @@ query getShiftRoleById(
companyName
}
teamHub{
hubName
}
}
}
}
@@ -80,6 +86,7 @@ query listShiftRolesByShiftId(
}
shift{
location
locationAddress
description
orderId
@@ -135,6 +142,7 @@ query listShiftRolesByRoleId(
}
shift{
location
locationAddress
description
orderId
@@ -197,6 +205,7 @@ query listShiftRolesByShiftIdAndTimeRange(
}
shift{
location
locationAddress
description
orderId
@@ -233,6 +242,7 @@ query listShiftRolesByVendorId(
shiftRoles(
where: {
shift: {
status: {in: [IN_PROGRESS, CONFIRMED, ASSIGNED, OPEN, PENDING]} #IN_PROGRESS? PENDING?
order: {
vendorId: { eq: $vendorId }
}
@@ -266,9 +276,12 @@ query listShiftRolesByVendorId(
id
title
date
location
locationAddress
description
orderId
status
durationDays
order {
id
@@ -322,10 +335,11 @@ query listShiftRolesByBusinessAndDateRange(
shift {
id
date
location
locationAddress
title
status
order { id }
order { id eventName }
}
}
}
@@ -367,11 +381,21 @@ query listShiftRolesByBusinessAndOrder(
title
date
orderId
location
locationAddress
order{
vendorId
eventName
date
#location
teamHub {
address
placeId
hubName
}
}
}
}
@@ -417,6 +441,7 @@ query listShiftRolesByBusinessDateRangeCompletedOrders(
shift {
id
date
location
locationAddress
title
status
@@ -514,4 +539,4 @@ query getCompletedShiftsByBusinessId(
#vendor { id companyName }
}
}
}
}

View File

@@ -1,31 +1,169 @@
mutation createTaxForm(
$formType: TaxFormType!
$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
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
) @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
}
)
)
}
mutation deleteTaxForm($id: UUID!) @auth(level: USER) {
taxForm_delete(id: $id)
}
taxForm_delete(id: $id)
}

View File

@@ -1,7 +1,45 @@
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
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
@@ -14,6 +52,38 @@ query getTaxFormById($id: UUID!) @auth(level: USER) {
taxForm(id: $id) {
id
formType
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
@@ -22,10 +92,51 @@ query getTaxFormById($id: UUID!) @auth(level: USER) {
}
}
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
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
@@ -34,10 +145,12 @@ query getTaxFormsBystaffId($staffId: UUID!) @auth(level: USER) {
}
}
query filterTaxForms(
query listTaxFormsWhere(
$formType: TaxFormType
$status: TaxFormStatus
$staffId: UUID
$offset: Int
$limit: Int
) @auth(level: USER) {
taxForms(
where: {
@@ -45,10 +158,48 @@ query filterTaxForms(
status: { eq: $status }
staffId: { eq: $staffId }
}
offset: $offset
limit: $limit
orderBy: { createdAt: DESC }
) {
id
formType
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
}
}
}