Merge branch 'dev' into authentication-web
This commit is contained in:
@@ -27,7 +27,7 @@ mutation updateApplicationStatus(
|
||||
$status: ApplicationStatus
|
||||
$checkInTime: Timestamp
|
||||
$checkOutTime: Timestamp
|
||||
$roleId: UUID!
|
||||
$roleId: UUID
|
||||
) @auth(level: USER) {
|
||||
application_update(
|
||||
id: $id
|
||||
|
||||
@@ -700,4 +700,4 @@ query listCompletedApplicationsByStaffId(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,13 @@ query listInvoices(
|
||||
eventName
|
||||
deparment
|
||||
poReference
|
||||
|
||||
teamHub {
|
||||
address
|
||||
placeId
|
||||
hubName
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -104,6 +111,13 @@ query getInvoiceById($id: UUID!) @auth(level: USER) {
|
||||
eventName
|
||||
deparment
|
||||
poReference
|
||||
|
||||
teamHub {
|
||||
address
|
||||
placeId
|
||||
hubName
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -166,6 +180,13 @@ query listInvoicesByVendorId(
|
||||
eventName
|
||||
deparment
|
||||
poReference
|
||||
|
||||
teamHub {
|
||||
address
|
||||
placeId
|
||||
hubName
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -228,6 +249,13 @@ query listInvoicesByBusinessId(
|
||||
eventName
|
||||
deparment
|
||||
poReference
|
||||
|
||||
teamHub {
|
||||
address
|
||||
placeId
|
||||
hubName
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -290,6 +318,13 @@ query listInvoicesByOrderId(
|
||||
eventName
|
||||
deparment
|
||||
poReference
|
||||
|
||||
teamHub {
|
||||
address
|
||||
placeId
|
||||
hubName
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -352,6 +387,13 @@ query listInvoicesByStatus(
|
||||
eventName
|
||||
deparment
|
||||
poReference
|
||||
|
||||
teamHub {
|
||||
address
|
||||
placeId
|
||||
hubName
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -433,6 +475,13 @@ query filterInvoices(
|
||||
eventName
|
||||
deparment
|
||||
poReference
|
||||
|
||||
teamHub {
|
||||
address
|
||||
placeId
|
||||
hubName
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -499,6 +548,13 @@ query listOverdueInvoices(
|
||||
eventName
|
||||
deparment
|
||||
poReference
|
||||
|
||||
teamHub {
|
||||
address
|
||||
placeId
|
||||
hubName
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -393,6 +393,47 @@ query getRapidOrders(
|
||||
}
|
||||
}
|
||||
|
||||
#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
|
||||
}
|
||||
}
|
||||
|
||||
#to validate if an hub has orders before delete
|
||||
query listOrdersByBusinessAndTeamHub(
|
||||
$businessId: UUID!
|
||||
|
||||
@@ -13,6 +13,11 @@ mutation createShift(
|
||||
$locationAddress: String
|
||||
$latitude: Float
|
||||
$longitude: Float
|
||||
$placeId: String
|
||||
$city: String
|
||||
$state: String
|
||||
$street: String
|
||||
$country: String
|
||||
$description: String
|
||||
|
||||
$status: ShiftStatus
|
||||
@@ -40,6 +45,11 @@ mutation createShift(
|
||||
locationAddress: $locationAddress
|
||||
latitude: $latitude
|
||||
longitude: $longitude
|
||||
placeId: $placeId
|
||||
city: $city
|
||||
state: $state
|
||||
street: $street
|
||||
country: $country
|
||||
description: $description
|
||||
|
||||
status: $status
|
||||
@@ -68,6 +78,11 @@ mutation updateShift(
|
||||
$locationAddress: String
|
||||
$latitude: Float
|
||||
$longitude: Float
|
||||
$placeId: String
|
||||
$city: String
|
||||
$state: String
|
||||
$street: String
|
||||
$country: String
|
||||
$description: String
|
||||
|
||||
$status: ShiftStatus
|
||||
@@ -95,6 +110,11 @@ mutation updateShift(
|
||||
locationAddress: $locationAddress
|
||||
latitude: $latitude
|
||||
longitude: $longitude
|
||||
placeId: $placeId
|
||||
city: $city
|
||||
state: $state
|
||||
street: $street
|
||||
country: $country
|
||||
description: $description
|
||||
|
||||
status: $status
|
||||
|
||||
@@ -22,6 +22,11 @@ query listShifts(
|
||||
locationAddress
|
||||
latitude
|
||||
longitude
|
||||
placeId
|
||||
city
|
||||
state
|
||||
street
|
||||
country
|
||||
description
|
||||
|
||||
status
|
||||
@@ -69,6 +74,11 @@ query getShiftById($id: UUID!) @auth(level: USER) {
|
||||
locationAddress
|
||||
latitude
|
||||
longitude
|
||||
placeId
|
||||
city
|
||||
state
|
||||
street
|
||||
country
|
||||
description
|
||||
|
||||
status
|
||||
@@ -134,6 +144,11 @@ query filterShifts(
|
||||
locationAddress
|
||||
latitude
|
||||
longitude
|
||||
placeId
|
||||
city
|
||||
state
|
||||
street
|
||||
country
|
||||
description
|
||||
|
||||
status
|
||||
@@ -194,6 +209,11 @@ query getShiftsByBusinessId(
|
||||
locationAddress
|
||||
latitude
|
||||
longitude
|
||||
placeId
|
||||
city
|
||||
state
|
||||
street
|
||||
country
|
||||
description
|
||||
|
||||
status
|
||||
@@ -254,6 +274,11 @@ query getShiftsByVendorId(
|
||||
locationAddress
|
||||
latitude
|
||||
longitude
|
||||
placeId
|
||||
city
|
||||
state
|
||||
street
|
||||
country
|
||||
description
|
||||
|
||||
status
|
||||
|
||||
@@ -166,4 +166,4 @@ mutation updateTaxForm(
|
||||
|
||||
mutation deleteTaxForm($id: UUID!) @auth(level: USER) {
|
||||
taxForm_delete(id: $id)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,17 @@ mutation createTeamHub(
|
||||
$teamId: UUID!
|
||||
$hubName: String!
|
||||
$address: String!
|
||||
|
||||
$placeId: String
|
||||
$latitude: Float
|
||||
$longitude: Float
|
||||
|
||||
$city: String
|
||||
$state: String
|
||||
$street: String
|
||||
$country: String
|
||||
$zipCode: String
|
||||
|
||||
$managerName: String
|
||||
$isActive: Boolean
|
||||
$departments: Any
|
||||
@@ -14,42 +22,72 @@ mutation createTeamHub(
|
||||
teamId: $teamId
|
||||
hubName: $hubName
|
||||
address: $address
|
||||
|
||||
placeId: $placeId
|
||||
latitude: $latitude
|
||||
longitude: $longitude
|
||||
|
||||
city: $city
|
||||
state: $state
|
||||
street: $street
|
||||
country: $country
|
||||
zipCode: $zipCode
|
||||
|
||||
managerName: $managerName
|
||||
isActive: $isActive
|
||||
departments: $departments
|
||||
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
mutation updateTeamHub(
|
||||
$id: UUID!
|
||||
|
||||
$teamId: UUID
|
||||
$hubName: String
|
||||
$address: String
|
||||
|
||||
$placeId: String
|
||||
$latitude: Float
|
||||
$longitude: Float
|
||||
|
||||
$city: String
|
||||
$state: String
|
||||
$street: String
|
||||
$country: String
|
||||
$zipCode: String
|
||||
|
||||
$managerName: String
|
||||
$isActive: Boolean
|
||||
$departments: Any
|
||||
|
||||
) @auth(level: USER) {
|
||||
teamHub_update(
|
||||
id: $id
|
||||
data: {
|
||||
teamId: $teamId
|
||||
hubName: $hubName
|
||||
address: $address
|
||||
|
||||
placeId: $placeId
|
||||
latitude: $latitude
|
||||
longitude: $longitude
|
||||
|
||||
city: $city
|
||||
state: $state
|
||||
street: $street
|
||||
country: $country
|
||||
zipCode: $zipCode
|
||||
|
||||
managerName: $managerName
|
||||
isActive: $isActive
|
||||
departments: $departments
|
||||
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
mutation deleteTeamHub($id: UUID!) @auth(level: USER) {
|
||||
teamHub_delete(id: $id)
|
||||
}
|
||||
teamHub_delete(id: $id)
|
||||
}
|
||||
@@ -1,18 +1,30 @@
|
||||
query listTeamHubs @auth(level: USER) {
|
||||
teamHubs {
|
||||
|
||||
# ==========================================================
|
||||
# TEAM HUB - QUERIES (USE where, NOT filter)
|
||||
# Include ALL fields in TeamHub
|
||||
# ==========================================================
|
||||
|
||||
query listTeamHubs($offset: Int, $limit: Int) @auth(level: USER) {
|
||||
teamHubs(offset: $offset, limit: $limit, orderBy: { createdAt: DESC }) {
|
||||
id
|
||||
teamId
|
||||
hubName
|
||||
|
||||
address
|
||||
placeId
|
||||
latitude
|
||||
longitude
|
||||
|
||||
city
|
||||
state
|
||||
street
|
||||
country
|
||||
zipCode
|
||||
|
||||
managerName
|
||||
isActive
|
||||
departments
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,34 +33,55 @@ query getTeamHubById($id: UUID!) @auth(level: USER) {
|
||||
id
|
||||
teamId
|
||||
hubName
|
||||
|
||||
address
|
||||
placeId
|
||||
latitude
|
||||
longitude
|
||||
|
||||
city
|
||||
state
|
||||
street
|
||||
country
|
||||
zipCode
|
||||
|
||||
managerName
|
||||
isActive
|
||||
departments
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
query getTeamHubsByTeamId($teamId: UUID!) @auth(level: USER) {
|
||||
teamHubs(where: { teamId: { eq: $teamId } }) {
|
||||
query getTeamHubsByTeamId(
|
||||
$teamId: UUID!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
teamHubs(
|
||||
where: { teamId: { eq: $teamId } }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
orderBy: { createdAt: DESC }
|
||||
) {
|
||||
id
|
||||
teamId
|
||||
hubName
|
||||
|
||||
address
|
||||
placeId
|
||||
latitude
|
||||
longitude
|
||||
|
||||
city
|
||||
state
|
||||
street
|
||||
country
|
||||
zipCode
|
||||
|
||||
managerName
|
||||
isActive
|
||||
departments
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +90,8 @@ query getTeamHubsByTeamId($teamId: UUID!) @auth(level: USER) {
|
||||
# ------------------------------------------------------------
|
||||
query listTeamHubsByOwnerId(
|
||||
$ownerId: UUID!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
teamHubs(
|
||||
where: {
|
||||
@@ -64,17 +99,28 @@ query listTeamHubsByOwnerId(
|
||||
ownerId: { eq: $ownerId }
|
||||
}
|
||||
}
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
orderBy: { createdAt: DESC }
|
||||
) {
|
||||
id
|
||||
teamId
|
||||
hubName
|
||||
|
||||
address
|
||||
placeId
|
||||
latitude
|
||||
longitude
|
||||
|
||||
city
|
||||
state
|
||||
street
|
||||
country
|
||||
zipCode
|
||||
|
||||
managerName
|
||||
isActive
|
||||
departments
|
||||
createdAt
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
67
backend/dataconnect/functions/clean.gql
Normal file
67
backend/dataconnect/functions/clean.gql
Normal file
@@ -0,0 +1,67 @@
|
||||
mutation unseedAll @auth(level: USER) {
|
||||
# ----------------------------------
|
||||
# Leaf/Join tables
|
||||
# ----------------------------------
|
||||
taskComment_deleteMany(all: true)
|
||||
memberTask_deleteMany(all: true)
|
||||
assignment_deleteMany(all: true)
|
||||
application_deleteMany(all: true)
|
||||
message_deleteMany(all: true)
|
||||
userConversation_deleteMany(all: true)
|
||||
conversation_deleteMany(all: true)
|
||||
activityLog_deleteMany(all: true)
|
||||
clientFeedback_deleteMany(all: true)
|
||||
recentPayment_deleteMany(all: true)
|
||||
invoice_deleteMany(all: true)
|
||||
invoiceTemplate_deleteMany(all: true)
|
||||
customRateCard_deleteMany(all: true)
|
||||
vendorRate_deleteMany(all: true)
|
||||
vendorBenefitPlan_deleteMany(all: true)
|
||||
staffCourse_deleteMany(all: true)
|
||||
staffDocument_deleteMany(all: true)
|
||||
staffRole_deleteMany(all: true)
|
||||
staffAvailability_deleteMany(all: true)
|
||||
staffAvailabilityStats_deleteMany(all: true)
|
||||
emergencyContact_deleteMany(all: true)
|
||||
taxForm_deleteMany(all: true)
|
||||
certificate_deleteMany(all: true)
|
||||
|
||||
# ----------------------------------
|
||||
# Tasks / Shifts / Orders
|
||||
# ----------------------------------
|
||||
task_deleteMany(all: true)
|
||||
shiftRole_deleteMany(all: true)
|
||||
shift_deleteMany(all: true)
|
||||
order_deleteMany(all: true)
|
||||
|
||||
# ----------------------------------
|
||||
# Teams / Hubs / Org
|
||||
# ----------------------------------
|
||||
teamMember_deleteMany(all: true)
|
||||
teamHudDepartment_deleteMany(all: true)
|
||||
team_deleteMany(all: true)
|
||||
teamHub_deleteMany(all: true)
|
||||
hub_deleteMany(all: true)
|
||||
|
||||
# ----------------------------------
|
||||
# Catalog / Config
|
||||
# ----------------------------------
|
||||
roleCategory_deleteMany(all: true)
|
||||
role_deleteMany(all: true)
|
||||
category_deleteMany(all: true)
|
||||
level_deleteMany(all: true)
|
||||
course_deleteMany(all: true)
|
||||
faqData_deleteMany(all: true)
|
||||
benefitsData_deleteMany(all: true)
|
||||
attireOption_deleteMany(all: true)
|
||||
document_deleteMany(all: true)
|
||||
|
||||
# ----------------------------------
|
||||
# Core entities
|
||||
# ----------------------------------
|
||||
staff_deleteMany(all: true)
|
||||
vendor_deleteMany(all: true)
|
||||
business_deleteMany(all: true)
|
||||
account_deleteMany(all: true)
|
||||
user_deleteMany(all: true)
|
||||
}
|
||||
1726
backend/dataconnect/functions/seed.gql
Normal file
1726
backend/dataconnect/functions/seed.gql
Normal file
File diff suppressed because it is too large
Load Diff
1897
backend/dataconnect/seed_last.gql
Normal file
1897
backend/dataconnect/seed_last.gql
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user