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
}
}
}
}