feat: Integrate Data Connect and Implement Staff List View Directory

This commit is contained in:
dhinesh-m24
2026-01-31 16:54:59 +05:30
parent 48bb1c457c
commit cb25b33d04
255 changed files with 21425 additions and 109 deletions

View File

@@ -0,0 +1,100 @@
mutation createOrder(
$vendorId: UUID
$businessId: UUID!
$orderType: OrderType!
#$location: String
$status: OrderStatus
$date: Timestamp
$startDate: Timestamp
$endDate: Timestamp
$duration: OrderDuration
$lunchBreak: Int
$total: Float
$eventName: String
$assignedStaff: Any
$shifts: Any
$requested: Int
$teamHubId: UUID!
$recurringDays: Any
$permanentStartDate: Timestamp
$permanentDays: Any
$notes: String
$detectedConflicts: Any
$poReference: String
) @auth(level: USER) {
order_insert(
data: {
vendorId: $vendorId
businessId: $businessId
orderType: $orderType
#location: $location
status: $status
date: $date
startDate: $startDate
endDate: $endDate
duration: $duration
lunchBreak: $lunchBreak
total: $total
eventName: $eventName
assignedStaff: $assignedStaff
shifts: $shifts
requested: $requested
teamHubId: $teamHubId
recurringDays: $recurringDays
permanentDays: $permanentDays
notes: $notes
detectedConflicts: $detectedConflicts
poReference: $poReference
}
)
}
mutation updateOrder(
$id: UUID!
$vendorId: UUID
$businessId: UUID
#$location: String
$status: OrderStatus
$date: Timestamp
$startDate: Timestamp
$endDate: Timestamp
$total: Float
$eventName: String
$assignedStaff: Any
$shifts: Any
$requested: Int
$teamHubId: UUID!
$recurringDays: Any
$permanentDays: Any
$notes: String
$detectedConflicts: Any
$poReference: String
) @auth(level: USER) {
order_update(
id: $id
data: {
vendorId: $vendorId
businessId: $businessId
#location: $location
status: $status
date: $date
startDate: $startDate
endDate: $endDate
total: $total
eventName: $eventName
assignedStaff: $assignedStaff
shifts: $shifts
requested: $requested
teamHubId: $teamHubId
recurringDays: $recurringDays
permanentDays: $permanentDays
notes: $notes
detectedConflicts: $detectedConflicts
poReference: $poReference
}
)
}
mutation deleteOrder($id: UUID!) @auth(level: USER) {
order_delete(id: $id)
}

View File

@@ -0,0 +1,435 @@
# ------------------------------------------------------------
# LIST ALL ORDERS
# ------------------------------------------------------------
query listOrders(
$offset: Int
$limit: Int
) @auth(level: USER) {
orders(offset: $offset, limit: $limit) {
id
eventName
vendorId
businessId
orderType
#location
status
date
startDate
endDate
duration
lunchBreak
total
assignedStaff
shifts
requested
recurringDays
permanentDays
poReference
detectedConflicts
notes
createdAt
business {
id
businessName
email
contactName
}
vendor {
id
companyName
}
teamHub {
address
placeId
hubName
}
}
}
# ------------------------------------------------------------
# GET ORDER BY ID
# ------------------------------------------------------------
query getOrderById($id: UUID!) @auth(level: USER) {
order(id: $id) {
id
eventName
vendorId
businessId
orderType
#location
status
date
startDate
endDate
duration
lunchBreak
total
assignedStaff
shifts
requested
recurringDays
permanentDays
poReference
detectedConflicts
notes
createdAt
business {
id
businessName
email
contactName
}
vendor {
id
companyName
}
teamHub {
address
placeId
hubName
}
}
}
# ------------------------------------------------------------
# GET ORDERS BY BUSINESS
# ------------------------------------------------------------
query getOrdersByBusinessId(
$businessId: UUID!
$offset: Int
$limit: Int
) @auth(level: USER) {
orders(
where: { businessId: { eq: $businessId } }
offset: $offset
limit: $limit
) {
id
eventName
vendorId
businessId
orderType
#location
status
date
startDate
endDate
duration
lunchBreak
total
assignedStaff
shifts
requested
recurringDays
permanentDays
poReference
detectedConflicts
notes
createdAt
business {
id
businessName
email
contactName
}
vendor {
id
companyName
}
teamHub {
address
placeId
hubName
}
}
}
# ------------------------------------------------------------
# GET ORDERS BY VENDOR
# ------------------------------------------------------------
query getOrdersByVendorId(
$vendorId: UUID!
$offset: Int
$limit: Int
) @auth(level: USER) {
orders(
where: { vendorId: { eq: $vendorId } }
offset: $offset
limit: $limit
) {
id
eventName
vendorId
businessId
orderType
#location
status
date
startDate
endDate
duration
lunchBreak
total
assignedStaff
shifts
requested
recurringDays
permanentDays
poReference
detectedConflicts
notes
createdAt
business {
id
businessName
email
contactName
}
vendor {
id
companyName
}
teamHub {
address
placeId
hubName
}
}
}
# ------------------------------------------------------------
# GET ORDERS BY STATUS
# ------------------------------------------------------------
query getOrdersByStatus(
$status: OrderStatus!
$offset: Int
$limit: Int
) @auth(level: USER) {
orders(
where: { status: { eq: $status } }
offset: $offset
limit: $limit
) {
id
eventName
vendorId
businessId
orderType
#location
status
date
startDate
endDate
duration
lunchBreak
total
assignedStaff
shifts
requested
recurringDays
permanentDays
poReference
detectedConflicts
notes
createdAt
business {
id
businessName
email
contactName
}
vendor {
id
companyName
}
teamHub {
address
placeId
hubName
}
}
}
# ------------------------------------------------------------
# GET ORDERS BY DATE RANGE
# ------------------------------------------------------------
query getOrdersByDateRange(
$start: Timestamp!
$end: Timestamp!
$offset: Int
$limit: Int
) @auth(level: USER) {
orders(
where: {
date: { ge: $start, le: $end }
}
offset: $offset
limit: $limit
) {
id
eventName
vendorId
businessId
orderType
#location
status
date
startDate
endDate
duration
lunchBreak
total
assignedStaff
shifts
requested
recurringDays
permanentDays
poReference
detectedConflicts
notes
createdAt
business {
id
businessName
email
contactName
}
vendor {
id
companyName
}
teamHub {
address
placeId
hubName
}
}
}
# ------------------------------------------------------------
# GET RAPID ORDERS
# ------------------------------------------------------------
query getRapidOrders(
$offset: Int
$limit: Int
) @auth(level: USER) {
orders(
where: { orderType: { eq: RAPID } }
offset: $offset
limit: $limit
) {
id
eventName
vendorId
businessId
orderType
#location
status
date
startDate
endDate
duration
lunchBreak
total
assignedStaff
shifts
requested
recurringDays
permanentDays
poReference
detectedConflicts
notes
createdAt
business {
id
businessName
email
contactName
}
vendor {
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
}
}