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 date
startTime startTime
endTime endTime
location
status status
order { order {
id id
eventName eventName
#location
teamHub {
address
placeId
hubName
}
business { business {
id id
businessName businessName
@@ -70,11 +79,20 @@ query getApplicationById($id: UUID!) @auth(level: USER) {
date date
startTime startTime
endTime endTime
location
status status
order { order {
id id
eventName eventName
#location
teamHub {
address
placeId
hubName
}
business { business {
id id
businessName businessName
@@ -125,11 +143,20 @@ query getApplicationsByShiftId($shiftId: UUID!) @auth(level: USER) {
date date
startTime startTime
endTime endTime
location
status status
order { order {
id id
eventName eventName
#location
teamHub {
address
placeId
hubName
}
business { business {
id id
businessName businessName
@@ -193,11 +220,20 @@ query getApplicationsByShiftIdAndStatus(
date date
startTime startTime
endTime endTime
location
status status
order { order {
id id
eventName eventName
#location
teamHub {
address
placeId
hubName
}
business { business {
id id
businessName businessName
@@ -233,9 +269,18 @@ query getApplicationsByStaffId(
$staffId: UUID! $staffId: UUID!
$offset: Int $offset: Int
$limit: Int $limit: Int
$dayStart: Timestamp
$dayEnd: Timestamp
) @auth(level: USER) { ) @auth(level: USER) {
applications( 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 offset: $offset
limit: $limit limit: $limit
) { ) {
@@ -255,16 +300,30 @@ query getApplicationsByStaffId(
date date
startTime startTime
endTime endTime
location
status status
durationDays
description
latitude
longitude
order { order {
id id
eventName eventName
#location
teamHub {
address
placeId
hubName
}
business { business {
id id
businessName businessName
email email
contactName contactName
companyLogoUrl
} }
vendor { vendor {
id 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 #getting staffs of an shiftrole ACCEPTED for orders view client
query listAcceptedApplicationsByShiftRoleKey( query listAcceptedApplicationsByShiftRoleKey(
$shiftId: UUID! $shiftId: UUID!
@@ -327,7 +550,8 @@ query listAcceptedApplicationsByBusinessForDay(
) @auth(level: USER) { ) @auth(level: USER) {
applications( applications(
where: { where: {
status: { eq: ACCEPTED } #status: { eq: ACCEPTED }
status: { in: [ACCEPTED, CONFIRMED, CHECKED_IN, CHECKED_OUT, LATE] }
shift: { shift: {
date: { ge: $dayStart, le: $dayEnd } date: { ge: $dayStart, le: $dayEnd }
order: { businessId: { eq: $businessId } } order: { businessId: { eq: $businessId } }
@@ -343,7 +567,7 @@ query listAcceptedApplicationsByBusinessForDay(
checkInTime checkInTime
checkOutTime checkOutTime
appliedAt appliedAt
staff { id fullName email phone photoUrl } staff { id fullName email phone photoUrl averageRating }
} }
} }
@@ -378,10 +602,12 @@ query listStaffsApplicationsByBusinessForDay(
shiftRole{ shiftRole{
shift{ shift{
location
cost cost
} }
count count
assigned assigned
hours
role{ role{
name name
@@ -389,4 +615,89 @@ query listStaffsApplicationsByBusinessForDay(
} }
staff { id fullName email phone photoUrl } 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 $vendorId: UUID
$businessId: UUID! $businessId: UUID!
$orderType: OrderType! $orderType: OrderType!
#$location: String
$status: OrderStatus $status: OrderStatus
$date: Timestamp $date: Timestamp
$startDate: Timestamp $startDate: Timestamp
@@ -13,6 +14,7 @@ mutation createOrder(
$assignedStaff: Any $assignedStaff: Any
$shifts: Any $shifts: Any
$requested: Int $requested: Int
$teamHubId: UUID!
$recurringDays: Any $recurringDays: Any
$permanentStartDate: Timestamp $permanentStartDate: Timestamp
$permanentDays: Any $permanentDays: Any
@@ -25,6 +27,7 @@ mutation createOrder(
vendorId: $vendorId vendorId: $vendorId
businessId: $businessId businessId: $businessId
orderType: $orderType orderType: $orderType
#location: $location
status: $status status: $status
date: $date date: $date
startDate: $startDate startDate: $startDate
@@ -36,6 +39,7 @@ mutation createOrder(
assignedStaff: $assignedStaff assignedStaff: $assignedStaff
shifts: $shifts shifts: $shifts
requested: $requested requested: $requested
teamHubId: $teamHubId
recurringDays: $recurringDays recurringDays: $recurringDays
permanentDays: $permanentDays permanentDays: $permanentDays
notes: $notes notes: $notes
@@ -49,6 +53,7 @@ mutation updateOrder(
$id: UUID! $id: UUID!
$vendorId: UUID $vendorId: UUID
$businessId: UUID $businessId: UUID
#$location: String
$status: OrderStatus $status: OrderStatus
$date: Timestamp $date: Timestamp
$startDate: Timestamp $startDate: Timestamp
@@ -58,6 +63,7 @@ mutation updateOrder(
$assignedStaff: Any $assignedStaff: Any
$shifts: Any $shifts: Any
$requested: Int $requested: Int
$teamHubId: UUID!
$recurringDays: Any $recurringDays: Any
$permanentDays: Any $permanentDays: Any
$notes: String $notes: String
@@ -69,6 +75,7 @@ mutation updateOrder(
data: { data: {
vendorId: $vendorId vendorId: $vendorId
businessId: $businessId businessId: $businessId
#location: $location
status: $status status: $status
date: $date date: $date
startDate: $startDate startDate: $startDate
@@ -78,6 +85,7 @@ mutation updateOrder(
assignedStaff: $assignedStaff assignedStaff: $assignedStaff
shifts: $shifts shifts: $shifts
requested: $requested requested: $requested
teamHubId: $teamHubId
recurringDays: $recurringDays recurringDays: $recurringDays
permanentDays: $permanentDays permanentDays: $permanentDays
notes: $notes notes: $notes
@@ -89,4 +97,4 @@ mutation updateOrder(
mutation deleteOrder($id: UUID!) @auth(level: USER) { mutation deleteOrder($id: UUID!) @auth(level: USER) {
order_delete(id: $id) order_delete(id: $id)
} }

View File

@@ -12,6 +12,7 @@ query listOrders(
vendorId vendorId
businessId businessId
orderType orderType
#location
status status
date date
startDate startDate
@@ -40,6 +41,13 @@ query listOrders(
id id
companyName companyName
} }
teamHub {
address
placeId
hubName
}
} }
} }
@@ -54,6 +62,7 @@ query getOrderById($id: UUID!) @auth(level: USER) {
vendorId vendorId
businessId businessId
orderType orderType
#location
status status
date date
startDate startDate
@@ -82,6 +91,13 @@ query getOrderById($id: UUID!) @auth(level: USER) {
id id
companyName companyName
} }
teamHub {
address
placeId
hubName
}
} }
} }
@@ -104,6 +120,7 @@ query getOrdersByBusinessId(
vendorId vendorId
businessId businessId
orderType orderType
#location
status status
date date
startDate startDate
@@ -132,6 +149,13 @@ query getOrdersByBusinessId(
id id
companyName companyName
} }
teamHub {
address
placeId
hubName
}
} }
} }
@@ -154,6 +178,7 @@ query getOrdersByVendorId(
vendorId vendorId
businessId businessId
orderType orderType
#location
status status
date date
startDate startDate
@@ -182,6 +207,13 @@ query getOrdersByVendorId(
id id
companyName companyName
} }
teamHub {
address
placeId
hubName
}
} }
} }
@@ -204,6 +236,7 @@ query getOrdersByStatus(
vendorId vendorId
businessId businessId
orderType orderType
#location
status status
date date
startDate startDate
@@ -232,6 +265,13 @@ query getOrdersByStatus(
id id
companyName companyName
} }
teamHub {
address
placeId
hubName
}
} }
} }
@@ -257,6 +297,7 @@ query getOrdersByDateRange(
vendorId vendorId
businessId businessId
orderType orderType
#location
status status
date date
startDate startDate
@@ -285,6 +326,13 @@ query getOrdersByDateRange(
id id
companyName companyName
} }
teamHub {
address
placeId
hubName
}
} }
} }
@@ -306,6 +354,7 @@ query getRapidOrders(
vendorId vendorId
businessId businessId
orderType orderType
#location
status status
date date
startDate startDate
@@ -334,5 +383,53 @@ query getRapidOrders(
id id
companyName 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 { shift {
title title
date date
location
locationAddress locationAddress
description description
} }
@@ -85,6 +86,7 @@ query getRecentPaymentById($id: UUID!) @auth(level: USER) {
shift { shift {
title title
date date
location
locationAddress locationAddress
description description
} }
@@ -157,7 +159,18 @@ query listRecentPaymentsByStaffId(
business { id businessName } business { id businessName }
vendor { id companyName } vendor { id companyName }
order { id eventName } order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
}
} }
} }
} }
@@ -203,7 +216,18 @@ query listRecentPaymentsByApplicationId(
amount amount
business { id businessName } business { id businessName }
vendor { id companyName } vendor { id companyName }
order { id eventName } order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
}
} }
} }
} }
@@ -249,7 +273,18 @@ query listRecentPaymentsByInvoiceId(
amount amount
business { id businessName } business { id businessName }
vendor { id companyName } vendor { id companyName }
order { id eventName } order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
}
} }
} }
} }
@@ -295,7 +330,18 @@ query listRecentPaymentsByStatus(
amount amount
business { id businessName } business { id businessName }
vendor { id companyName } vendor { id companyName }
order { id eventName } order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
}
} }
} }
} }
@@ -342,7 +388,18 @@ query listRecentPaymentsByInvoiceIds(
amount amount
business { id businessName } business { id businessName }
vendor { id companyName } vendor { id companyName }
order { id eventName } order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
}
} }
} }
} }
@@ -392,6 +449,7 @@ query listRecentPaymentsByBusinessId(
id id
title title
date date
location
locationAddress locationAddress
description description
} }
@@ -408,7 +466,18 @@ query listRecentPaymentsByBusinessId(
business { id businessName } business { id businessName }
vendor { id companyName } vendor { id companyName }
order { id eventName } order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
}
} }
} }
} }

View File

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

View File

@@ -1,31 +1,169 @@
mutation createTaxForm( mutation createTaxForm(
$formType: TaxFormType! $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! $staffId: UUID!
$formData: Any $createdBy: String
) @auth(level: USER) { ) @auth(level: USER) {
taxForm_insert( taxForm_insert(
data: { data: {
formType: $formType 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 status: $status
staffId: $staffId staffId: $staffId
formData: $formData createdBy: $createdBy
} }
) )
} }
mutation updateTaxForm( mutation updateTaxForm(
$id: UUID! $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 $status: TaxFormStatus
) @auth(level: USER) { ) @auth(level: USER) {
taxForm_update( taxForm_update(
id: $id id: $id
data: { 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 status: $status
} }
) )
} }
mutation deleteTaxForm($id: UUID!) @auth(level: USER) { 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 id
formType 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 status
staffId staffId
createdAt createdAt
@@ -14,6 +52,38 @@ query getTaxFormById($id: UUID!) @auth(level: USER) {
taxForm(id: $id) { taxForm(id: $id) {
id id
formType 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 status
staffId staffId
createdAt createdAt
@@ -22,10 +92,51 @@ query getTaxFormById($id: UUID!) @auth(level: USER) {
} }
} }
query getTaxFormsBystaffId($staffId: UUID!) @auth(level: USER) { query getTaxFormsByStaffId(
taxForms(where: { staffId: { eq: $staffId } }) { $staffId: UUID!
$offset: Int
$limit: Int
) @auth(level: USER) {
taxForms(
where: { staffId: { eq: $staffId } }
offset: $offset
limit: $limit
orderBy: { createdAt: DESC }
) {
id id
formType 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 status
staffId staffId
createdAt createdAt
@@ -34,10 +145,12 @@ query getTaxFormsBystaffId($staffId: UUID!) @auth(level: USER) {
} }
} }
query filterTaxForms( query listTaxFormsWhere(
$formType: TaxFormType $formType: TaxFormType
$status: TaxFormStatus $status: TaxFormStatus
$staffId: UUID $staffId: UUID
$offset: Int
$limit: Int
) @auth(level: USER) { ) @auth(level: USER) {
taxForms( taxForms(
where: { where: {
@@ -45,10 +158,48 @@ query filterTaxForms(
status: { eq: $status } status: { eq: $status }
staffId: { eq: $staffId } staffId: { eq: $staffId }
} }
offset: $offset
limit: $limit
orderBy: { createdAt: DESC }
) { ) {
id id
formType 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 status
staffId staffId
createdAt
updatedAt
createdBy
} }
} }