@burdenoff/microfe-crewfoundry 2026.1029.1 → 2026.1029.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { create as e } from "zustand";
2
2
  import { graphqlFetch as t } from "@burdenoff/fe-libs/shared/graphql";
3
3
  //#region src/crewfoundry/store/crewfoundryStore.ts
4
- var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n employees { id firstName lastName email department position status type salary startDate avatar location managerId phone performanceScore skills terminationDate }\n departments { id name headId headName employeeCount budget location status }\n jobPostings { id title department location type experienceLevel salaryMin salaryMax status applicants postedDate deadline description requirements benefits }\n candidates { id firstName lastName email phone position status appliedDate resumeUrl rating source experience skills currentCompany notes hiredDate }\n interviews { id candidateId candidateName position interviewerName date time type status feedback rating }\n announcements { id title content author authorRole category priority isPinned createdAt viewCount tags }\n teams { id name description leadId leadName members memberCount department status projectCount createdAt }\n projects { id name description status priority startDate endDate progress budget spent teamId teamName managerId managerName tasks completedTasks }\n leaveRequests { id employeeId employeeName department type startDate endDate days status reason approverName }\n timeEntries { id employeeId employeeName date clockIn clockOut totalHours overtime project status billable }\n vendors { id name category contactPerson email phone status contractValue rating }\n clients { id name industry contactPerson email phone status revenue projects since }\n }\n }\n", r = "\n query CrewPayrollRecords {\n crewPayrollRecords { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod }\n }\n", i = "\n query CrewfoundryWorkspaceBootstrapWithOverlap(\n $workspaceId: ID!\n $projectPagination: PaginationInput\n $groupFirst: Int\n $conversationFirst: Int\n ) {\n crewfoundryBootstrap {\n employees { id firstName lastName email department position status type salary startDate avatar location managerId phone performanceScore skills terminationDate }\n departments { id name headId headName employeeCount budget location status }\n jobPostings { id title department location type experienceLevel salaryMin salaryMax status applicants postedDate deadline description requirements benefits }\n candidates { id firstName lastName email phone position status appliedDate resumeUrl rating source experience skills currentCompany notes hiredDate }\n interviews { id candidateId candidateName position interviewerName date time type status feedback rating }\n announcements { id title content author authorRole category priority isPinned createdAt viewCount tags }\n teams { id name description leadId leadName members memberCount department status projectCount createdAt }\n projects { id name description status priority startDate endDate progress budget spent teamId teamName managerId managerName tasks completedTasks }\n leaveRequests { id employeeId employeeName department type startDate endDate days status reason approverName }\n timeEntries { id employeeId employeeName date clockIn clockOut totalHours overtime project status billable }\n vendors { id name category contactPerson email phone status contractValue rating }\n clients { id name industry contactPerson email phone status revenue projects since }\n }\n projects(filter: { workspaceId: $workspaceId }, pagination: $projectPagination) {\n items {\n id\n name\n key\n creatorId\n status\n config\n archived\n createdAt\n updatedAt\n }\n }\n groups(first: $groupFirst) {\n edges {\n node {\n id\n name\n description\n groupType\n status\n memberCount\n ownerId\n createdAt\n }\n }\n }\n conversations(first: $conversationFirst) {\n edges {\n node {\n id\n title\n description\n state\n unreadCount\n memberCount\n updatedAt\n }\n }\n }\n }\n", a = "mutation CreateCrewEmployee($input: CreateCrewEmployeeInput!) { createCrewEmployee(input: $input) { id firstName lastName email department position status type salary startDate avatar location managerId phone performanceScore skills terminationDate } }", o = "mutation UpdateCrewEmployee($id: ID!, $input: UpdateCrewEmployeeInput!) { updateCrewEmployee(id: $id, input: $input) { id firstName lastName email department position status type salary startDate avatar location managerId phone performanceScore skills terminationDate } }", s = "mutation RemoveCrewEmployee($id: ID!) { removeCrewEmployee(id: $id) }", c = "mutation CreateCrewJobPosting($input: CreateCrewJobPostingInput!) { createCrewJobPosting(input: $input) { id title department location type experienceLevel salaryMin salaryMax status applicants postedDate deadline description requirements benefits } }", l = "mutation UpdateCrewJobPosting($id: ID!, $input: UpdateCrewJobPostingInput!) { updateCrewJobPosting(id: $id, input: $input) { id title department location type experienceLevel salaryMin salaryMax status applicants postedDate deadline description requirements benefits } }", u = "mutation CreateCrewCandidate($input: CreateCrewCandidateInput!) { createCrewCandidate(input: $input) { id firstName lastName email phone position status appliedDate resumeUrl rating source experience skills currentCompany notes hiredDate } }", d = "mutation UpdateCrewCandidate($id: ID!, $input: UpdateCrewCandidateInput!) { updateCrewCandidate(id: $id, input: $input) { id firstName lastName email phone position status appliedDate resumeUrl rating source experience skills currentCompany notes hiredDate } }", f = "mutation CreateCrewAnnouncement($input: CreateCrewAnnouncementInput!) { createCrewAnnouncement(input: $input) { id title content author authorRole category priority isPinned createdAt viewCount tags } }", p = "mutation CreateCrewLeaveRequest($input: CreateCrewLeaveRequestInput!) { createCrewLeaveRequest(input: $input) { id employeeId employeeName department type startDate endDate days status reason approverName } }", m = "mutation UpdateCrewLeaveRequest($id: ID!, $input: UpdateCrewLeaveRequestInput!) { updateCrewLeaveRequest(id: $id, input: $input) { id employeeId employeeName department type startDate endDate days status reason approverName } }", h = "mutation RemoveCrewJobPosting($id: ID!) { removeCrewJobPosting(id: $id) }", g = "mutation RemoveCrewCandidate($id: ID!) { removeCrewCandidate(id: $id) }", _ = "mutation UpdateCrewAnnouncement($id: ID!, $input: UpdateCrewAnnouncementInput!) { updateCrewAnnouncement(id: $id, input: $input) { id title content author authorRole category priority isPinned createdAt viewCount tags } }", v = "mutation RemoveCrewAnnouncement($id: ID!) { removeCrewAnnouncement(id: $id) }", y = "mutation CreateCrewInterview($input: CreateCrewInterviewInput!) { createCrewInterview(input: $input) { id candidateId candidateName position interviewerName date time type status feedback rating } }", b = "mutation UpdateCrewInterview($id: ID!, $input: UpdateCrewInterviewInput!) { updateCrewInterview(id: $id, input: $input) { id candidateId candidateName position interviewerName date time type status feedback rating } }", x = "mutation RemoveCrewInterview($id: ID!) { removeCrewInterview(id: $id) }", ee = "mutation CreateCrewVendor($input: CreateCrewVendorInput!) { createCrewVendor(input: $input) { id name category contactPerson email phone status contractValue rating } }", te = "mutation UpdateCrewVendor($id: ID!, $input: UpdateCrewVendorInput!) { updateCrewVendor(id: $id, input: $input) { id name category contactPerson email phone status contractValue rating } }", ne = "mutation RemoveCrewVendor($id: ID!) { removeCrewVendor(id: $id) }", re = "mutation CreateCrewClient($input: CreateCrewClientInput!) { createCrewClient(input: $input) { id name industry contactPerson email phone status revenue projects since } }", ie = "mutation UpdateCrewClient($id: ID!, $input: UpdateCrewClientInput!) { updateCrewClient(id: $id, input: $input) { id name industry contactPerson email phone status revenue projects since } }", ae = "mutation RemoveCrewClient($id: ID!) { removeCrewClient(id: $id) }", oe = "mutation CreateCrewTeam($input: CreateCrewTeamInput!) { createCrewTeam(input: $input) { id name description leadId leadName members memberCount department status projectCount createdAt } }", se = "mutation UpdateCrewTeam($id: ID!, $input: UpdateCrewTeamInput!) { updateCrewTeam(id: $id, input: $input) { id name description leadId leadName members memberCount department status projectCount createdAt } }", ce = "mutation RemoveCrewTeam($id: ID!) { removeCrewTeam(id: $id) }", le = "mutation CreateCrewProject($input: CreateCrewProjectInput!) { createCrewProject(input: $input) { id name description status priority startDate endDate progress budget spent teamId teamName managerId managerName tasks completedTasks } }", ue = "mutation UpdateCrewProject($id: ID!, $input: UpdateCrewProjectInput!) { updateCrewProject(id: $id, input: $input) { id name description status priority startDate endDate progress budget spent teamId teamName managerId managerName tasks completedTasks } }", de = "mutation RemoveCrewProject($id: ID!) { removeCrewProject(id: $id) }", fe = "mutation CreateCrewDepartment($input: CreateCrewDepartmentInput!) { createCrewDepartment(input: $input) { id name headId headName employeeCount budget location status } }", pe = "mutation UpdateCrewDepartment($id: ID!, $input: UpdateCrewDepartmentInput!) { updateCrewDepartment(id: $id, input: $input) { id name headId headName employeeCount budget location status } }", me = "mutation RemoveCrewDepartment($id: ID!) { removeCrewDepartment(id: $id) }", he = "mutation CreateCrewPayrollRecord($input: CreateCrewPayrollRecordInput!) { createCrewPayrollRecord(input: $input) { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod } }", ge = "mutation UpdateCrewPayrollRecord($id: ID!, $input: UpdateCrewPayrollRecordInput!) { updateCrewPayrollRecord(id: $id, input: $input) { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod } }", _e = "mutation RemoveCrewPayrollRecord($id: ID!) { removeCrewPayrollRecord(id: $id) }", S = "id country currency period payDate status employeeCount totalGrossPay totalNetPay calculatedAt approvedAt approvedBy notes", ve = `query CrewPayrollRuns { crewPayrollRuns { ${S} } }`, ye = `mutation CreateCrewPayrollRun($input: CreateCrewPayrollRunInput!) { createCrewPayrollRun(input: $input) { ${S} } }`, be = `mutation CalculateCrewPayrollRun($id: ID!) { calculateCrewPayrollRun(id: $id) { ${S} } }`, xe = `mutation ApproveCrewPayrollRun($id: ID!) { approveCrewPayrollRun(id: $id) { ${S} } }`, Se = "mutation RemoveCrewPayrollRun($id: ID!) { removeCrewPayrollRun(id: $id) }", Ce = "query CrewPayslips($filter: CrewPayslipFilterInput) { crewPayslips(filter: $filter) { id payrollRunId employeeId employeeName country currency period annualGrossSalary grossPay taxableIncome incomeTax employeeSocialContrib employerSocialContrib otherDeductions netPay incomeTaxBrackets { label rate bandFrom bandTo taxableInBand taxOnBand } employeeContributions { label rate base amount } employerContributions { label rate base amount } otherDeductionLines { label rate base amount } assumptions } }", we = "mutation CreateCrewTimeEntry($input: CreateCrewTimeEntryInput!) { createCrewTimeEntry(input: $input) { id employeeId employeeName date clockIn clockOut totalHours overtime project status billable } }", Te = "mutation UpdateCrewTimeEntry($id: ID!, $input: UpdateCrewTimeEntryInput!) { updateCrewTimeEntry(id: $id, input: $input) { id employeeId employeeName date clockIn clockOut totalHours overtime project status billable } }", C = "mutation RemoveCrewTimeEntry($id: ID!) { removeCrewTimeEntry(id: $id) }", w = "query CrewJobPostingMatches($jobPostingId: ID!, $filter: CrewCandidateMatchFilterInput, $limit: Int) { crewJobPostingMatches(jobPostingId: $jobPostingId, filter: $filter, limit: $limit) { candidateId jobPostingId score skillScore experienceScore matchedSkills missingSkills rationale candidate { id firstName lastName email phone position status appliedDate resumeUrl rating source experience skills currentCompany notes hiredDate } } }", T = "query CrewSkillsGap { crewSkillsGap { skill employeesWithSkill openJobsRequiringSkill shortage } }", E = "query EmployeeDocuments($employeeId: ID!) { employeeDocuments(employeeId: $employeeId) { id employeeId fileId title category uploadedBy uploadedAt } }", D = "mutation AttachEmployeeDocument($input: AttachCrewEmployeeDocumentInput!) { attachEmployeeDocument(input: $input) { id employeeId fileId title category uploadedBy uploadedAt } }", O = "mutation DetachEmployeeDocument($id: ID!) { detachEmployeeDocument(id: $id) }", Ee = "mutation EnsureFolderByPath($path: String!) { ensureFolderByPath(path: $path) { id } }", De = "mutation InitiateUpload($input: InitiateUploadInput!) { initiateUpload(input: $input) { session { id } uploadUrl } }", Oe = "mutation CompleteUpload($input: CompleteUploadInput!) { completeUpload(input: $input) { file { id } } }", ke = "query CrewOnboardings { crewOnboardings { id candidateId employeeId fullName position department startDate status currentStage createdAt totalTaskCount completedTaskCount progressPercent tasks { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } } }", Ae = "mutation CreateCrewOnboarding($input: CreateCrewOnboardingInput!) { createCrewOnboarding(input: $input) { id candidateId employeeId fullName position department startDate status currentStage createdAt totalTaskCount completedTaskCount progressPercent tasks { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } } }", je = "mutation UpdateCrewOnboarding($id: ID!, $input: UpdateCrewOnboardingInput!) { updateCrewOnboarding(id: $id, input: $input) { id candidateId employeeId fullName position department startDate status currentStage createdAt totalTaskCount completedTaskCount progressPercent tasks { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } } }", Me = "mutation RemoveCrewOnboarding($id: ID!) { removeCrewOnboarding(id: $id) }", Ne = "mutation CreateCrewOnboardingTask($input: CreateCrewOnboardingTaskInput!) { createCrewOnboardingTask(input: $input) { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } }", Pe = "mutation UpdateCrewOnboardingTask($id: ID!, $input: UpdateCrewOnboardingTaskInput!) { updateCrewOnboardingTask(id: $id, input: $input) { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } }", Fe = "mutation RemoveCrewOnboardingTask($id: ID!) { removeCrewOnboardingTask(id: $id) }", Ie = "mutation ToggleCrewOnboardingTask($id: ID!, $completed: Boolean!) { toggleCrewOnboardingTask(id: $id, completed: $completed) { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } }", k = "id title description contentUrl durationMinutes isActive requiredForRoles createdAt updatedAt", A = "id courseId courseTitle employeeId employeeName status startedAt completedAt createdAt updatedAt", Le = `query CrewLearning($coursePage: PaginationInput, $enrollmentPage: PaginationInput) { crewTrainingCourses(pagination: $coursePage) { ${k} } crewEnrollments(pagination: $enrollmentPage) { ${A} } crewTrainingCompletionDashboard { courseId courseTitle totalEnrolled notStartedCount inProgressCount completedCount completionRate } }`, Re = `query CrewTrainingCourses($pagination: PaginationInput) { crewTrainingCourses(pagination: $pagination) { ${k} } }`, ze = `query CrewEnrollments($pagination: PaginationInput) { crewEnrollments(pagination: $pagination) { ${A} } }`, Be = "query CrewTrainingCompletionDashboard { crewTrainingCompletionDashboard { courseId courseTitle totalEnrolled notStartedCount inProgressCount completedCount completionRate } }", Ve = `mutation CreateCrewTrainingCourse($input: CreateCrewTrainingCourseInput!) { createCrewTrainingCourse(input: $input) { ${k} } }`, He = `mutation UpdateCrewTrainingCourse($id: ID!, $input: UpdateCrewTrainingCourseInput!) { updateCrewTrainingCourse(id: $id, input: $input) { ${k} } }`, Ue = "mutation RemoveCrewTrainingCourse($id: ID!) { removeCrewTrainingCourse(id: $id) }", We = `mutation CreateCrewEnrollment($input: CreateCrewEnrollmentInput!) { createCrewEnrollment(input: $input) { ${A} } }`, Ge = `mutation UpdateCrewEnrollmentStatus($id: ID!, $status: String!) { updateCrewEnrollmentStatus(id: $id, status: $status) { ${A} } }`, Ke = "mutation RemoveCrewEnrollment($id: ID!) { removeCrewEnrollment(id: $id) }", j = "id title description category providerActorId providerName rate rateUnit currency status createdAt updatedAt", M = "id listingId listingTitle providerActorId providerName clientActorId clientName status rate rateUnit currency notes scheduledStart scheduledEnd cancelledReason createdAt updatedAt", N = "id bookingId amount currency releaseCondition status heldAt releasedAt releasedBy notes createdAt updatedAt", qe = `query CrewServiceListings($pagination: PaginationInput) { crewServiceListings(pagination: $pagination) { ${j} } }`, Je = `query CrewBookings($pagination: PaginationInput) { crewBookings(pagination: $pagination) { ${M} } }`, Ye = `query CrewEscrowRecords($pagination: PaginationInput) { crewEscrowRecords(pagination: $pagination) { ${N} } }`, Xe = `mutation CreateCrewServiceListing($input: CreateCrewServiceListingInput!) { createCrewServiceListing(input: $input) { ${j} } }`, P = `mutation UpdateMyServiceListing($id: ID!, $input: UpdateCrewServiceListingInput!) { updateMyServiceListing(id: $id, input: $input) { ${j} } }`, Ze = "mutation RemoveMyServiceListing($id: ID!) { removeMyServiceListing(id: $id) }", Qe = `mutation CreateCrewBooking($input: CreateCrewBookingInput!) { createCrewBooking(input: $input) { ${M} } }`, $e = `mutation UpdateMyBookingStatus($id: ID!, $status: String!) { updateMyBookingStatus(id: $id, status: $status) { ${M} } }`, et = `mutation ReleaseCrewEscrowRecord($id: ID!) { releaseCrewEscrowRecord(id: $id) { ${N} } }`, tt = `mutation CancelCrewEscrowRecord($id: ID!) { cancelCrewEscrowRecord(id: $id) { ${N} } }`, F = 100, nt = 10, I = (e) => e.toUpperCase().replaceAll("-", "_"), L = {
4
+ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n employees { id firstName lastName email department position status type salary startDate avatar location managerId phone performanceScore skills terminationDate }\n departments { id name headId headName employeeCount budget location status }\n jobPostings { id title department location type experienceLevel salaryMin salaryMax status applicants postedDate deadline description requirements benefits }\n candidates { id firstName lastName email phone position status appliedDate resumeUrl rating source experience skills currentCompany notes hiredDate }\n interviews { id candidateId candidateName position interviewerName date time type status feedback rating }\n announcements { id title content author authorRole category priority isPinned createdAt viewCount tags }\n teams { id name description leadId leadName members memberCount department status projectCount createdAt }\n projects { id name description status priority startDate endDate progress budget spent teamId teamName managerId managerName tasks completedTasks }\n leaveRequests { id employeeId employeeName department type startDate endDate days status reason approverName }\n timeEntries { id employeeId employeeName date clockIn clockOut totalHours overtime project status billable }\n vendors { id name category contactPerson email phone status contractValue rating }\n clients { id name industry contactPerson email phone status revenue projects since }\n }\n }\n", r = "\n query CrewPayrollRecords {\n crewPayrollRecords { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod }\n }\n", i = "\n query CrewfoundryWorkspaceBootstrapWithOverlap(\n $workspaceId: ID!\n $projectPagination: PaginationInput\n $groupFirst: Int\n $conversationFirst: Int\n ) {\n crewfoundryBootstrap {\n employees { id firstName lastName email department position status type salary startDate avatar location managerId phone performanceScore skills terminationDate }\n departments { id name headId headName employeeCount budget location status }\n jobPostings { id title department location type experienceLevel salaryMin salaryMax status applicants postedDate deadline description requirements benefits }\n candidates { id firstName lastName email phone position status appliedDate resumeUrl rating source experience skills currentCompany notes hiredDate }\n interviews { id candidateId candidateName position interviewerName date time type status feedback rating }\n announcements { id title content author authorRole category priority isPinned createdAt viewCount tags }\n teams { id name description leadId leadName members memberCount department status projectCount createdAt }\n projects { id name description status priority startDate endDate progress budget spent teamId teamName managerId managerName tasks completedTasks }\n leaveRequests { id employeeId employeeName department type startDate endDate days status reason approverName }\n timeEntries { id employeeId employeeName date clockIn clockOut totalHours overtime project status billable }\n vendors { id name category contactPerson email phone status contractValue rating }\n clients { id name industry contactPerson email phone status revenue projects since }\n }\n projects(filter: { workspaceId: $workspaceId }, pagination: $projectPagination) {\n items {\n id\n name\n key\n creatorId\n status\n config\n archived\n createdAt\n updatedAt\n }\n }\n groups(first: $groupFirst) {\n edges {\n node {\n id\n name\n description\n groupType\n status\n memberCount\n ownerId\n createdAt\n }\n }\n }\n conversations(first: $conversationFirst) {\n edges {\n node {\n id\n title\n description\n state\n unreadCount\n memberCount\n updatedAt\n }\n }\n }\n }\n", a = "mutation CreateCrewEmployee($input: CreateCrewEmployeeInput!) { createCrewEmployee(input: $input) { id firstName lastName email department position status type salary startDate avatar location managerId phone performanceScore skills terminationDate } }", o = "mutation UpdateCrewEmployee($id: ID!, $input: UpdateCrewEmployeeInput!) { updateCrewEmployee(id: $id, input: $input) { id firstName lastName email department position status type salary startDate avatar location managerId phone performanceScore skills terminationDate } }", s = "mutation RemoveCrewEmployee($id: ID!) { removeCrewEmployee(id: $id) }", c = "mutation CreateCrewJobPosting($input: CreateCrewJobPostingInput!) { createCrewJobPosting(input: $input) { id title department location type experienceLevel salaryMin salaryMax status applicants postedDate deadline description requirements benefits } }", l = "mutation UpdateCrewJobPosting($id: ID!, $input: UpdateCrewJobPostingInput!) { updateCrewJobPosting(id: $id, input: $input) { id title department location type experienceLevel salaryMin salaryMax status applicants postedDate deadline description requirements benefits } }", u = "mutation CreateCrewCandidate($input: CreateCrewCandidateInput!) { createCrewCandidate(input: $input) { id firstName lastName email phone position status appliedDate resumeUrl rating source experience skills currentCompany notes hiredDate } }", d = "mutation UpdateCrewCandidate($id: ID!, $input: UpdateCrewCandidateInput!) { updateCrewCandidate(id: $id, input: $input) { id firstName lastName email phone position status appliedDate resumeUrl rating source experience skills currentCompany notes hiredDate } }", f = "mutation CreateCrewAnnouncement($input: CreateCrewAnnouncementInput!) { createCrewAnnouncement(input: $input) { id title content author authorRole category priority isPinned createdAt viewCount tags } }", p = "mutation CreateCrewLeaveRequest($input: CreateCrewLeaveRequestInput!) { createCrewLeaveRequest(input: $input) { id employeeId employeeName department type startDate endDate days status reason approverName } }", m = "mutation UpdateCrewLeaveRequest($id: ID!, $input: UpdateCrewLeaveRequestInput!) { updateCrewLeaveRequest(id: $id, input: $input) { id employeeId employeeName department type startDate endDate days status reason approverName } }", h = "mutation RemoveCrewJobPosting($id: ID!) { removeCrewJobPosting(id: $id) }", g = "mutation RemoveCrewCandidate($id: ID!) { removeCrewCandidate(id: $id) }", _ = "mutation UpdateCrewAnnouncement($id: ID!, $input: UpdateCrewAnnouncementInput!) { updateCrewAnnouncement(id: $id, input: $input) { id title content author authorRole category priority isPinned createdAt viewCount tags } }", v = "mutation RemoveCrewAnnouncement($id: ID!) { removeCrewAnnouncement(id: $id) }", y = "mutation CreateCrewInterview($input: CreateCrewInterviewInput!) { createCrewInterview(input: $input) { id candidateId candidateName position interviewerName date time type status feedback rating } }", b = "mutation UpdateCrewInterview($id: ID!, $input: UpdateCrewInterviewInput!) { updateCrewInterview(id: $id, input: $input) { id candidateId candidateName position interviewerName date time type status feedback rating } }", x = "mutation RemoveCrewInterview($id: ID!) { removeCrewInterview(id: $id) }", ee = "mutation CreateCrewVendor($input: CreateCrewVendorInput!) { createCrewVendor(input: $input) { id name category contactPerson email phone status contractValue rating } }", te = "mutation UpdateCrewVendor($id: ID!, $input: UpdateCrewVendorInput!) { updateCrewVendor(id: $id, input: $input) { id name category contactPerson email phone status contractValue rating } }", ne = "mutation RemoveCrewVendor($id: ID!) { removeCrewVendor(id: $id) }", re = "mutation CreateCrewClient($input: CreateCrewClientInput!) { createCrewClient(input: $input) { id name industry contactPerson email phone status revenue projects since } }", ie = "mutation UpdateCrewClient($id: ID!, $input: UpdateCrewClientInput!) { updateCrewClient(id: $id, input: $input) { id name industry contactPerson email phone status revenue projects since } }", ae = "mutation RemoveCrewClient($id: ID!) { removeCrewClient(id: $id) }", oe = "mutation CreateCrewTeam($input: CreateCrewTeamInput!) { createCrewTeam(input: $input) { id name description leadId leadName members memberCount department status projectCount createdAt } }", se = "mutation UpdateCrewTeam($id: ID!, $input: UpdateCrewTeamInput!) { updateCrewTeam(id: $id, input: $input) { id name description leadId leadName members memberCount department status projectCount createdAt } }", ce = "mutation RemoveCrewTeam($id: ID!) { removeCrewTeam(id: $id) }", le = "mutation CreateCrewProject($input: CreateCrewProjectInput!) { createCrewProject(input: $input) { id name description status priority startDate endDate progress budget spent teamId teamName managerId managerName tasks completedTasks } }", ue = "mutation UpdateCrewProject($id: ID!, $input: UpdateCrewProjectInput!) { updateCrewProject(id: $id, input: $input) { id name description status priority startDate endDate progress budget spent teamId teamName managerId managerName tasks completedTasks } }", de = "mutation RemoveCrewProject($id: ID!) { removeCrewProject(id: $id) }", fe = "mutation CreateCrewDepartment($input: CreateCrewDepartmentInput!) { createCrewDepartment(input: $input) { id name headId headName employeeCount budget location status } }", pe = "mutation UpdateCrewDepartment($id: ID!, $input: UpdateCrewDepartmentInput!) { updateCrewDepartment(id: $id, input: $input) { id name headId headName employeeCount budget location status } }", me = "mutation RemoveCrewDepartment($id: ID!) { removeCrewDepartment(id: $id) }", he = "mutation CreateCrewPayrollRecord($input: CreateCrewPayrollRecordInput!) { createCrewPayrollRecord(input: $input) { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod } }", ge = "mutation UpdateCrewPayrollRecord($id: ID!, $input: UpdateCrewPayrollRecordInput!) { updateCrewPayrollRecord(id: $id, input: $input) { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod } }", _e = "mutation RemoveCrewPayrollRecord($id: ID!) { removeCrewPayrollRecord(id: $id) }", S = "id country currency period payDate status employeeCount totalGrossPay totalNetPay calculatedAt approvedAt approvedBy notes", ve = `query CrewPayrollRuns { crewPayrollRuns { ${S} } }`, ye = `mutation CreateCrewPayrollRun($input: CreateCrewPayrollRunInput!) { createCrewPayrollRun(input: $input) { ${S} } }`, be = `mutation CalculateCrewPayrollRun($id: ID!) { calculateCrewPayrollRun(id: $id) { ${S} } }`, xe = `mutation ApproveCrewPayrollRun($id: ID!) { approveCrewPayrollRun(id: $id) { ${S} } }`, Se = "mutation RemoveCrewPayrollRun($id: ID!) { removeCrewPayrollRun(id: $id) }", Ce = "query CrewPayslips($filter: CrewPayslipFilterInput) { crewPayslips(filter: $filter) { id payrollRunId employeeId employeeName country currency period annualGrossSalary grossPay taxableIncome incomeTax employeeSocialContrib employerSocialContrib otherDeductions netPay incomeTaxBrackets { label rate bandFrom bandTo taxableInBand taxOnBand } employeeContributions { label rate base amount } employerContributions { label rate base amount } otherDeductionLines { label rate base amount } assumptions } }", we = "mutation CreateCrewTimeEntry($input: CreateCrewTimeEntryInput!) { createCrewTimeEntry(input: $input) { id employeeId employeeName date clockIn clockOut totalHours overtime project status billable } }", Te = "mutation UpdateCrewTimeEntry($id: ID!, $input: UpdateCrewTimeEntryInput!) { updateCrewTimeEntry(id: $id, input: $input) { id employeeId employeeName date clockIn clockOut totalHours overtime project status billable } }", Ee = "mutation RemoveCrewTimeEntry($id: ID!) { removeCrewTimeEntry(id: $id) }", De = "query CrewJobPostingMatches($jobPostingId: ID!, $filter: CrewCandidateMatchFilterInput, $limit: Int) { crewJobPostingMatches(jobPostingId: $jobPostingId, filter: $filter, limit: $limit) { candidateId jobPostingId score skillScore experienceScore matchedSkills missingSkills rationale candidate { id firstName lastName email phone position status appliedDate resumeUrl rating source experience skills currentCompany notes hiredDate } } }", C = "query CrewSkillsGap { crewSkillsGap { skill employeesWithSkill openJobsRequiringSkill shortage } }", w = "query EmployeeDocuments($employeeId: ID!) { employeeDocuments(employeeId: $employeeId) { id employeeId fileId title category uploadedBy uploadedAt } }", T = "mutation AttachEmployeeDocument($input: AttachCrewEmployeeDocumentInput!) { attachEmployeeDocument(input: $input) { id employeeId fileId title category uploadedBy uploadedAt } }", E = "mutation DetachEmployeeDocument($id: ID!) { detachEmployeeDocument(id: $id) }", Oe = "mutation EnsureFolderByPath($path: String!) { ensureFolderByPath(path: $path) { id } }", ke = "mutation InitiateUpload($input: InitiateUploadInput!) { initiateUpload(input: $input) { session { id } uploadUrl } }", Ae = "mutation CompleteUpload($input: CompleteUploadInput!) { completeUpload(input: $input) { file { id } } }", je = "query CrewOnboardings { crewOnboardings { id candidateId employeeId fullName position department startDate status currentStage createdAt totalTaskCount completedTaskCount progressPercent tasks { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } } }", Me = "mutation CreateCrewOnboarding($input: CreateCrewOnboardingInput!) { createCrewOnboarding(input: $input) { id candidateId employeeId fullName position department startDate status currentStage createdAt totalTaskCount completedTaskCount progressPercent tasks { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } } }", Ne = "mutation UpdateCrewOnboarding($id: ID!, $input: UpdateCrewOnboardingInput!) { updateCrewOnboarding(id: $id, input: $input) { id candidateId employeeId fullName position department startDate status currentStage createdAt totalTaskCount completedTaskCount progressPercent tasks { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } } }", Pe = "mutation RemoveCrewOnboarding($id: ID!) { removeCrewOnboarding(id: $id) }", Fe = "mutation CreateCrewOnboardingTask($input: CreateCrewOnboardingTaskInput!) { createCrewOnboardingTask(input: $input) { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } }", Ie = "mutation UpdateCrewOnboardingTask($id: ID!, $input: UpdateCrewOnboardingTaskInput!) { updateCrewOnboardingTask(id: $id, input: $input) { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } }", Le = "mutation RemoveCrewOnboardingTask($id: ID!) { removeCrewOnboardingTask(id: $id) }", Re = "mutation ToggleCrewOnboardingTask($id: ID!, $completed: Boolean!) { toggleCrewOnboardingTask(id: $id, completed: $completed) { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } }", D = "id title description contentUrl durationMinutes isActive requiredForRoles createdAt updatedAt", O = "id courseId courseTitle employeeId employeeName status startedAt completedAt createdAt updatedAt", ze = `query CrewLearning($coursePage: PaginationInput, $enrollmentPage: PaginationInput) { crewTrainingCourses(pagination: $coursePage) { ${D} } crewEnrollments(pagination: $enrollmentPage) { ${O} } crewTrainingCompletionDashboard { courseId courseTitle totalEnrolled notStartedCount inProgressCount completedCount completionRate } }`, Be = `query CrewTrainingCourses($pagination: PaginationInput) { crewTrainingCourses(pagination: $pagination) { ${D} } }`, Ve = `query CrewEnrollments($pagination: PaginationInput) { crewEnrollments(pagination: $pagination) { ${O} } }`, He = "query CrewTrainingCompletionDashboard { crewTrainingCompletionDashboard { courseId courseTitle totalEnrolled notStartedCount inProgressCount completedCount completionRate } }", Ue = `mutation CreateCrewTrainingCourse($input: CreateCrewTrainingCourseInput!) { createCrewTrainingCourse(input: $input) { ${D} } }`, We = `mutation UpdateCrewTrainingCourse($id: ID!, $input: UpdateCrewTrainingCourseInput!) { updateCrewTrainingCourse(id: $id, input: $input) { ${D} } }`, Ge = "mutation RemoveCrewTrainingCourse($id: ID!) { removeCrewTrainingCourse(id: $id) }", Ke = `mutation CreateCrewEnrollment($input: CreateCrewEnrollmentInput!) { createCrewEnrollment(input: $input) { ${O} } }`, qe = `mutation UpdateCrewEnrollmentStatus($id: ID!, $status: String!) { updateCrewEnrollmentStatus(id: $id, status: $status) { ${O} } }`, Je = "mutation RemoveCrewEnrollment($id: ID!) { removeCrewEnrollment(id: $id) }", k = "id title description category providerActorId providerName rate rateUnit currency status createdAt updatedAt", A = "id listingId listingTitle providerActorId providerName clientActorId clientName status rate rateUnit currency notes scheduledStart scheduledEnd cancelledReason createdAt updatedAt", j = "id bookingId amount currency releaseCondition status heldAt releasedAt releasedBy notes createdAt updatedAt", Ye = `query CrewServiceListings($pagination: PaginationInput) { crewServiceListings(pagination: $pagination) { ${k} } }`, Xe = `query CrewBookings($pagination: PaginationInput) { crewBookings(pagination: $pagination) { ${A} } }`, Ze = `query CrewEscrowRecords($pagination: PaginationInput) { crewEscrowRecords(pagination: $pagination) { ${j} } }`, Qe = `mutation CreateCrewServiceListing($input: CreateCrewServiceListingInput!) { createCrewServiceListing(input: $input) { ${k} } }`, $e = `mutation UpdateMyServiceListing($id: ID!, $input: UpdateCrewServiceListingInput!) { updateMyServiceListing(id: $id, input: $input) { ${k} } }`, et = "mutation RemoveMyServiceListing($id: ID!) { removeMyServiceListing(id: $id) }", M = `mutation CreateCrewBooking($input: CreateCrewBookingInput!) { createCrewBooking(input: $input) { ${A} } }`, tt = `mutation UpdateMyBookingStatus($id: ID!, $status: String!) { updateMyBookingStatus(id: $id, status: $status) { ${A} } }`, nt = `mutation ReleaseCrewEscrowRecord($id: ID!) { releaseCrewEscrowRecord(id: $id) { ${j} } }`, rt = `mutation CancelCrewEscrowRecord($id: ID!) { cancelCrewEscrowRecord(id: $id) { ${j} } }`, N = 100, it = 10, P = (e) => e.toUpperCase().replaceAll("-", "_"), F = {
5
5
  employee: ["status", "type"],
6
6
  department: ["status"],
7
7
  jobPosting: [
@@ -26,7 +26,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
26
26
  client: ["status"],
27
27
  onboarding: ["status", "currentStage"],
28
28
  onboardingTask: ["stage"]
29
- }, R = (e, t) => {
29
+ }, I = (e, t) => {
30
30
  if (!e || typeof e != "object") return e;
31
31
  let n = { ...e };
32
32
  for (let e of t) {
@@ -34,25 +34,25 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
34
34
  typeof t == "string" && (n[e] = t.toLowerCase());
35
35
  }
36
36
  return n;
37
- }, z = (e) => ({
38
- ...R(e, L.onboarding),
39
- tasks: (e.tasks ?? []).map((e) => R(e, L.onboardingTask))
40
- }), B = (e) => e ? e.slice(0, 10) : "TBD", rt = (e) => !e || typeof e != "object" || Array.isArray(e) ? null : e, V = (e) => typeof e == "number" ? e : null, H = (e) => typeof e == "string" ? e : null, it = (e) => {
37
+ }, L = (e) => ({
38
+ ...I(e, F.onboarding),
39
+ tasks: (e.tasks ?? []).map((e) => I(e, F.onboardingTask))
40
+ }), R = (e) => e ? e.slice(0, 10) : "TBD", at = (e) => !e || typeof e != "object" || Array.isArray(e) ? null : e, z = (e) => typeof e == "number" ? e : null, B = (e) => typeof e == "string" ? e : null, ot = (e) => {
41
41
  let t = e.toLowerCase();
42
42
  return t === "active" ? "active" : t === "completed" ? "completed" : t === "cancelled" ? "cancelled" : t === "archived" ? "on_hold" : "planning";
43
- }, at = (e) => {
43
+ }, st = (e) => {
44
44
  let t = e.toLowerCase();
45
45
  return t === "active" ? "active" : t === "inactive" || t === "archived" || t === "deleted" ? "disbanded" : "forming";
46
- }, ot = (e, t) => e.map((e, n) => {
47
- let r = rt(e.config), i = V(r?.budget) ?? 25e3 + n * 2500, a = V(r?.spent) ?? Math.round(i * (e.status === "COMPLETED" ? 1 : .62)), o = V(r?.progress) ?? (e.status === "COMPLETED" ? 100 : 58), s = V(r?.tasks) ?? 20 + n % 9, c = V(r?.completedTasks) ?? Math.round(o / 100 * s), l = t[n % Math.max(t.length, 1)];
46
+ }, ct = (e, t) => e.map((e, n) => {
47
+ let r = at(e.config), i = z(r?.budget) ?? 25e3 + n * 2500, a = z(r?.spent) ?? Math.round(i * (e.status === "COMPLETED" ? 1 : .62)), o = z(r?.progress) ?? (e.status === "COMPLETED" ? 100 : 58), s = z(r?.tasks) ?? 20 + n % 9, c = z(r?.completedTasks) ?? Math.round(o / 100 * s), l = t[n % Math.max(t.length, 1)];
48
48
  return {
49
49
  id: e.id,
50
50
  name: e.name,
51
- description: H(r?.description) || `${e.key} delivery plan`,
52
- status: it(e.status),
53
- priority: H(r?.priority)?.toLowerCase() || "medium",
54
- startDate: B(e.createdAt),
55
- endDate: B(e.updatedAt),
51
+ description: B(r?.description) || `${e.key} delivery plan`,
52
+ status: ot(e.status),
53
+ priority: B(r?.priority)?.toLowerCase() || "medium",
54
+ startDate: R(e.createdAt),
55
+ endDate: R(e.updatedAt),
56
56
  progress: o,
57
57
  budget: i,
58
58
  spent: a,
@@ -63,7 +63,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
63
63
  tasks: s,
64
64
  completedTasks: c
65
65
  };
66
- }), st = (e) => e.map(({ node: e }) => ({
66
+ }), lt = (e) => e.map(({ node: e }) => ({
67
67
  id: e.id,
68
68
  name: e.name,
69
69
  description: e.description || `${e.name} team workspace`,
@@ -72,10 +72,10 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
72
72
  members: [],
73
73
  memberCount: e.memberCount,
74
74
  department: e.groupType?.toLowerCase().replaceAll("_", " ") || "operations",
75
- status: at(e.status),
75
+ status: st(e.status),
76
76
  projectCount: 0,
77
- createdAt: B(e.createdAt)
78
- })), U = "/conversations", ct = (e) => e.filter(({ node: e }) => e.unreadCount > 0).map(({ node: e }) => ({
77
+ createdAt: R(e.createdAt)
78
+ })), V = "/conversations", ut = (e) => e.filter(({ node: e }) => e.unreadCount > 0).map(({ node: e }) => ({
79
79
  id: `conversation-${e.id}`,
80
80
  title: e.title || "Conversation update",
81
81
  message: `${e.unreadCount} unread in ${e.memberCount}-member channel`,
@@ -83,12 +83,12 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
83
83
  category: "communications",
84
84
  read: !1,
85
85
  createdAt: e.updatedAt,
86
- actionUrl: U
87
- })), lt = (e, t) => {
86
+ actionUrl: V
87
+ })), dt = (e, t) => {
88
88
  if (e.errors?.length) throw Error(e.errors[0]?.message || t);
89
89
  if (!e.data) throw Error(t);
90
90
  return e.data;
91
- }, ut = new Set([
91
+ }, ft = new Set([
92
92
  "id",
93
93
  "createdAt",
94
94
  "createdOn",
@@ -110,41 +110,44 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
110
110
  "viewCount",
111
111
  "revenue",
112
112
  "projects"
113
- ]), dt = (e) => {
113
+ ]), pt = (e) => {
114
114
  if (!e) return e;
115
115
  let t = e.input;
116
116
  if (!t || typeof t != "object" || Array.isArray(t)) return e;
117
117
  let n = {};
118
- for (let [e, r] of Object.entries(t)) ut.has(e) || (n[e] = r);
118
+ for (let [e, r] of Object.entries(t)) ft.has(e) || (n[e] = r);
119
119
  return {
120
120
  ...e,
121
121
  input: n
122
122
  };
123
- }, W = async (e, n, r, i, a = "workspace") => lt(await t({
123
+ }, H = async (e, n, r, i, a = "workspace") => dt(await t({
124
124
  gateway: a,
125
125
  query: e,
126
- variables: dt(n),
126
+ variables: pt(n),
127
127
  authToken: r.authToken,
128
128
  baseUrl: a === "workspace" ? r.apiGatewayUrl : void 0,
129
129
  extraHeaders: { ...a === "workspace" && r.workspaceId ? { "x-workspace-id": r.workspaceId } : {} }
130
- }), i), ft = () => !1, G = async (e, t, n, r, i = "workspace") => {
130
+ }), i), mt = () => !1, U = async (e, t, n, r, i = "workspace") => {
131
131
  try {
132
- return await W(e, t, n, r, i);
132
+ return await H(e, t, n, r, i);
133
133
  } catch (e) {
134
- return ft() && console.warn(`[crewfoundry] overlap query skipped: ${r}`, e), null;
134
+ return mt() && console.warn(`[crewfoundry] overlap query skipped: ${r}`, e), null;
135
135
  }
136
- }, K = async (e, t, n, r, i) => {
136
+ }, W = async (e, t, n, r, i) => {
137
137
  let a = i ? [...i] : [];
138
- if (i && i.length < F) return a;
139
- for (let o = +!!i; o < nt; o += 1) {
140
- let i = (await W(e, { pagination: {
141
- limit: F,
142
- offset: o * F
138
+ if (i && i.length < N) return a;
139
+ for (let o = +!!i; o < it; o += 1) {
140
+ let i = (await H(e, { pagination: {
141
+ limit: N,
142
+ offset: o * N
143
143
  } }, n, r))[t] ?? [];
144
- if (a.push(...i), i.length < F) break;
144
+ if (a.push(...i), i.length < N) break;
145
145
  }
146
146
  return a;
147
- }, q = (e) => R(e, L.enrollment), J = (e) => R(e, L.serviceListing), Y = (e) => R(e, L.booking), X = (e) => R(e, L.escrow), Z = (e, t) => e.map((e) => e.id === t.id ? t : e), Q = async (e) => (await G(Be, void 0, e, "Unable to load training completion"))?.crewTrainingCompletionDashboard ?? null, $ = e((e) => ({
147
+ }, G = {
148
+ learning: 0,
149
+ marketplace: 0
150
+ }, K = 3, q = (e) => I(e, F.enrollment), J = (e) => I(e, F.serviceListing), Y = (e) => I(e, F.booking), X = (e) => I(e, F.escrow), Z = (e, t) => e.map((e) => e.id === t.id ? t : e), Q = async (e) => (await U(He, void 0, e, "Unable to load training completion"))?.crewTrainingCompletionDashboard ?? null, $ = e((e) => ({
148
151
  metrics: [
149
152
  {
150
153
  label: "Total Employees",
@@ -246,7 +249,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
246
249
  initParams: t
247
250
  });
248
251
  try {
249
- let [a, o] = await Promise.all([G(i, {
252
+ let [a, o] = await Promise.all([U(i, {
250
253
  workspaceId: t.workspaceId,
251
254
  projectPagination: {
252
255
  limit: 50,
@@ -254,7 +257,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
254
257
  },
255
258
  groupFirst: 30,
256
259
  conversationFirst: 30
257
- }, t, "Unable to load workspace bootstrap with overlap data"), G(r, void 0, t, "Unable to load payroll records")]), s = a ? a.crewfoundryBootstrap : (await W(n, void 0, t, "Unable to load CrewFoundry data")).crewfoundryBootstrap, c = a ? st(a.groups.edges) : [], l = a ? ot(a.projects.items, c) : [], u = a ? ct(a.conversations.edges) : [], d = c.length > 0 ? c : s.teams, f = l.length > 0 ? l : s.projects, p = u, m = s.employees.map((e) => R(e, L.employee)), h = s.departments.map((e) => R(e, L.department)), g = s.jobPostings.map((e) => R(e, L.jobPosting)), _ = s.candidates.map((e) => R(e, L.candidate)), v = s.interviews.map((e) => R(e, L.interview)), y = s.announcements.map((e) => R(e, L.announcement)), b = d.map((e) => R(e, L.team)), x = f.map((e) => R(e, L.project));
260
+ }, t, "Unable to load workspace bootstrap with overlap data"), U(r, void 0, t, "Unable to load payroll records")]), s = a ? a.crewfoundryBootstrap : (await H(n, void 0, t, "Unable to load CrewFoundry data")).crewfoundryBootstrap, c = a ? lt(a.groups.edges) : [], l = a ? ct(a.projects.items, c) : [], u = a ? ut(a.conversations.edges) : [], d = c.length > 0 ? c : s.teams, f = l.length > 0 ? l : s.projects, p = u, m = s.employees.map((e) => I(e, F.employee)), h = s.departments.map((e) => I(e, F.department)), g = s.jobPostings.map((e) => I(e, F.jobPosting)), _ = s.candidates.map((e) => I(e, F.candidate)), v = s.interviews.map((e) => I(e, F.interview)), y = s.announcements.map((e) => I(e, F.announcement)), b = d.map((e) => I(e, F.team)), x = f.map((e) => I(e, F.project));
258
261
  e({
259
262
  employees: m,
260
263
  departments: h,
@@ -264,12 +267,12 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
264
267
  announcements: y,
265
268
  teams: b,
266
269
  projects: x,
267
- payrollRecords: (o?.crewPayrollRecords ?? []).map((e) => R(e, L.payrollRecord)),
268
- leaveRequests: s.leaveRequests.map((e) => R(e, L.leaveRequest)),
269
- timeEntries: s.timeEntries.map((e) => R(e, L.timeEntry)),
270
- notifications: p.map((e) => R(e, L.notification)),
271
- vendors: s.vendors.map((e) => R(e, L.vendor)),
272
- clients: s.clients.map((e) => R(e, L.client)),
270
+ payrollRecords: (o?.crewPayrollRecords ?? []).map((e) => I(e, F.payrollRecord)),
271
+ leaveRequests: s.leaveRequests.map((e) => I(e, F.leaveRequest)),
272
+ timeEntries: s.timeEntries.map((e) => I(e, F.timeEntry)),
273
+ notifications: p.map((e) => I(e, F.notification)),
274
+ vendors: s.vendors.map((e) => I(e, F.vendor)),
275
+ clients: s.clients.map((e) => I(e, F.client)),
273
276
  metrics: [
274
277
  {
275
278
  label: "Total Employees",
@@ -306,84 +309,84 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
306
309
  setSelectedView: (t) => e({ selectedView: t }),
307
310
  setWorkItems: (t) => e({ workItems: t }),
308
311
  addEmployee: async (t) => {
309
- let n = $.getState().initParams, r = await W(a, { input: {
312
+ let n = $.getState().initParams, r = await H(a, { input: {
310
313
  ...t,
311
- status: I(t.status),
312
- type: I(t.type)
314
+ status: P(t.status),
315
+ type: P(t.type)
313
316
  } }, n, "Unable to create employee");
314
- e((e) => ({ employees: [R(r.createCrewEmployee, L.employee), ...e.employees] }));
317
+ e((e) => ({ employees: [I(r.createCrewEmployee, F.employee), ...e.employees] }));
315
318
  },
316
319
  updateEmployee: async (t, n) => {
317
- let r = $.getState().initParams, i = await W(o, {
320
+ let r = $.getState().initParams, i = await H(o, {
318
321
  id: t,
319
322
  input: {
320
323
  ...n,
321
- ...n.status ? { status: I(n.status) } : {},
322
- ...n.type ? { type: I(n.type) } : {}
324
+ ...n.status ? { status: P(n.status) } : {},
325
+ ...n.type ? { type: P(n.type) } : {}
323
326
  }
324
327
  }, r, "Unable to update employee");
325
- e((e) => ({ employees: e.employees.map((e) => e.id === t ? R(i.updateCrewEmployee, L.employee) : e) }));
328
+ e((e) => ({ employees: e.employees.map((e) => e.id === t ? I(i.updateCrewEmployee, F.employee) : e) }));
326
329
  },
327
330
  removeEmployee: async (t) => {
328
331
  let n = $.getState().initParams;
329
- await W(s, { id: t }, n, "Unable to remove employee"), e((e) => ({ employees: e.employees.filter((e) => e.id !== t) }));
332
+ await H(s, { id: t }, n, "Unable to remove employee"), e((e) => ({ employees: e.employees.filter((e) => e.id !== t) }));
330
333
  },
331
334
  addJobPosting: async (t) => {
332
- let n = $.getState().initParams, r = await W(c, { input: {
335
+ let n = $.getState().initParams, r = await H(c, { input: {
333
336
  ...t,
334
- status: I(t.status)
337
+ status: P(t.status)
335
338
  } }, n, "Unable to create job posting");
336
- e((e) => ({ jobPostings: [R(r.createCrewJobPosting, L.jobPosting), ...e.jobPostings] }));
339
+ e((e) => ({ jobPostings: [I(r.createCrewJobPosting, F.jobPosting), ...e.jobPostings] }));
337
340
  },
338
341
  updateJobPosting: async (t, n) => {
339
- let r = $.getState().initParams, i = await W(l, {
342
+ let r = $.getState().initParams, i = await H(l, {
340
343
  id: t,
341
344
  input: {
342
345
  ...n,
343
- ...n.status ? { status: I(n.status) } : {}
346
+ ...n.status ? { status: P(n.status) } : {}
344
347
  }
345
348
  }, r, "Unable to update job posting");
346
- e((e) => ({ jobPostings: e.jobPostings.map((e) => e.id === t ? R(i.updateCrewJobPosting, L.jobPosting) : e) }));
349
+ e((e) => ({ jobPostings: e.jobPostings.map((e) => e.id === t ? I(i.updateCrewJobPosting, F.jobPosting) : e) }));
347
350
  },
348
351
  addCandidate: async (t) => {
349
- let n = $.getState().initParams, r = await W(u, { input: {
352
+ let n = $.getState().initParams, r = await H(u, { input: {
350
353
  ...t,
351
- status: I(t.status)
354
+ status: P(t.status)
352
355
  } }, n, "Unable to create candidate");
353
- e((e) => ({ candidates: [R(r.createCrewCandidate, L.candidate), ...e.candidates] }));
356
+ e((e) => ({ candidates: [I(r.createCrewCandidate, F.candidate), ...e.candidates] }));
354
357
  },
355
358
  updateCandidate: async (t, n) => {
356
- let r = $.getState().initParams, i = await W(d, {
359
+ let r = $.getState().initParams, i = await H(d, {
357
360
  id: t,
358
361
  input: {
359
362
  ...n,
360
- ...n.status ? { status: I(n.status) } : {}
363
+ ...n.status ? { status: P(n.status) } : {}
361
364
  }
362
365
  }, r, "Unable to update candidate");
363
- e((e) => ({ candidates: e.candidates.map((e) => e.id === t ? R(i.updateCrewCandidate, L.candidate) : e) }));
366
+ e((e) => ({ candidates: e.candidates.map((e) => e.id === t ? I(i.updateCrewCandidate, F.candidate) : e) }));
364
367
  },
365
368
  addAnnouncement: async (t) => {
366
- let n = $.getState().initParams, r = await W(f, { input: t }, n, "Unable to create announcement");
367
- e((e) => ({ announcements: [R(r.createCrewAnnouncement, L.announcement), ...e.announcements] }));
369
+ let n = $.getState().initParams, r = await H(f, { input: t }, n, "Unable to create announcement");
370
+ e((e) => ({ announcements: [I(r.createCrewAnnouncement, F.announcement), ...e.announcements] }));
368
371
  },
369
372
  addLeaveRequest: async (t) => {
370
- let n = $.getState().initParams, r = await W(p, { input: {
373
+ let n = $.getState().initParams, r = await H(p, { input: {
371
374
  ...t,
372
- type: I(t.type),
373
- status: I(t.status)
375
+ type: P(t.type),
376
+ status: P(t.status)
374
377
  } }, n, "Unable to create leave request");
375
- e((e) => ({ leaveRequests: [R(r.createCrewLeaveRequest, L.leaveRequest), ...e.leaveRequests] }));
378
+ e((e) => ({ leaveRequests: [I(r.createCrewLeaveRequest, F.leaveRequest), ...e.leaveRequests] }));
376
379
  },
377
380
  updateLeaveRequest: async (t, n) => {
378
- let r = $.getState().initParams, i = await W(m, {
381
+ let r = $.getState().initParams, i = await H(m, {
379
382
  id: t,
380
383
  input: {
381
384
  ...n,
382
- ...n.type ? { type: I(n.type) } : {},
383
- ...n.status ? { status: I(n.status) } : {}
385
+ ...n.type ? { type: P(n.type) } : {},
386
+ ...n.status ? { status: P(n.status) } : {}
384
387
  }
385
388
  }, r, "Unable to update leave request");
386
- e((e) => ({ leaveRequests: e.leaveRequests.map((e) => e.id === t ? R(i.updateCrewLeaveRequest, L.leaveRequest) : e) }));
389
+ e((e) => ({ leaveRequests: e.leaveRequests.map((e) => e.id === t ? I(i.updateCrewLeaveRequest, F.leaveRequest) : e) }));
387
390
  },
388
391
  markNotificationRead: async (t) => {
389
392
  e((e) => ({ notifications: e.notifications.map((e) => e.id === t ? {
@@ -399,184 +402,184 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
399
402
  },
400
403
  removeJobPosting: async (t) => {
401
404
  let n = $.getState().initParams;
402
- await W(h, { id: t }, n, "Unable to remove job posting"), e((e) => ({ jobPostings: e.jobPostings.filter((e) => e.id !== t) }));
405
+ await H(h, { id: t }, n, "Unable to remove job posting"), e((e) => ({ jobPostings: e.jobPostings.filter((e) => e.id !== t) }));
403
406
  },
404
407
  removeCandidate: async (t) => {
405
408
  let n = $.getState().initParams;
406
- await W(g, { id: t }, n, "Unable to remove candidate"), e((e) => ({ candidates: e.candidates.filter((e) => e.id !== t) }));
409
+ await H(g, { id: t }, n, "Unable to remove candidate"), e((e) => ({ candidates: e.candidates.filter((e) => e.id !== t) }));
407
410
  },
408
411
  updateAnnouncement: async (t, n) => {
409
- let r = $.getState().initParams, i = await W(_, {
412
+ let r = $.getState().initParams, i = await H(_, {
410
413
  id: t,
411
414
  input: n
412
415
  }, r, "Unable to update announcement");
413
- e((e) => ({ announcements: e.announcements.map((e) => e.id === t ? R(i.updateCrewAnnouncement, L.announcement) : e) }));
416
+ e((e) => ({ announcements: e.announcements.map((e) => e.id === t ? I(i.updateCrewAnnouncement, F.announcement) : e) }));
414
417
  },
415
418
  removeAnnouncement: async (t) => {
416
419
  let n = $.getState().initParams;
417
- await W(v, { id: t }, n, "Unable to remove announcement"), e((e) => ({ announcements: e.announcements.filter((e) => e.id !== t) }));
420
+ await H(v, { id: t }, n, "Unable to remove announcement"), e((e) => ({ announcements: e.announcements.filter((e) => e.id !== t) }));
418
421
  },
419
422
  addInterview: async (t) => {
420
- let n = $.getState().initParams, r = await W(y, { input: {
423
+ let n = $.getState().initParams, r = await H(y, { input: {
421
424
  ...t,
422
- type: I(t.type),
423
- status: I(t.status)
425
+ type: P(t.type),
426
+ status: P(t.status)
424
427
  } }, n, "Unable to schedule interview");
425
- e((e) => ({ interviews: [R(r.createCrewInterview, L.interview), ...e.interviews] }));
428
+ e((e) => ({ interviews: [I(r.createCrewInterview, F.interview), ...e.interviews] }));
426
429
  },
427
430
  updateInterview: async (t, n) => {
428
- let r = $.getState().initParams, i = await W(b, {
431
+ let r = $.getState().initParams, i = await H(b, {
429
432
  id: t,
430
433
  input: {
431
434
  ...n,
432
- ...n.type ? { type: I(n.type) } : {},
433
- ...n.status ? { status: I(n.status) } : {}
435
+ ...n.type ? { type: P(n.type) } : {},
436
+ ...n.status ? { status: P(n.status) } : {}
434
437
  }
435
438
  }, r, "Unable to update interview");
436
- e((e) => ({ interviews: e.interviews.map((e) => e.id === t ? R(i.updateCrewInterview, L.interview) : e) }));
439
+ e((e) => ({ interviews: e.interviews.map((e) => e.id === t ? I(i.updateCrewInterview, F.interview) : e) }));
437
440
  },
438
441
  removeInterview: async (t) => {
439
442
  let n = $.getState().initParams;
440
- await W(x, { id: t }, n, "Unable to remove interview"), e((e) => ({ interviews: e.interviews.filter((e) => e.id !== t) }));
443
+ await H(x, { id: t }, n, "Unable to remove interview"), e((e) => ({ interviews: e.interviews.filter((e) => e.id !== t) }));
441
444
  },
442
445
  addVendor: async (t) => {
443
- let n = $.getState().initParams, r = await W(ee, { input: {
446
+ let n = $.getState().initParams, r = await H(ee, { input: {
444
447
  ...t,
445
- status: I(t.status)
448
+ status: P(t.status)
446
449
  } }, n, "Unable to create vendor");
447
- e((e) => ({ vendors: [R(r.createCrewVendor, L.vendor), ...e.vendors] }));
450
+ e((e) => ({ vendors: [I(r.createCrewVendor, F.vendor), ...e.vendors] }));
448
451
  },
449
452
  updateVendor: async (t, n) => {
450
- let r = $.getState().initParams, i = await W(te, {
453
+ let r = $.getState().initParams, i = await H(te, {
451
454
  id: t,
452
455
  input: {
453
456
  ...n,
454
- ...n.status ? { status: I(n.status) } : {}
457
+ ...n.status ? { status: P(n.status) } : {}
455
458
  }
456
459
  }, r, "Unable to update vendor");
457
- e((e) => ({ vendors: e.vendors.map((e) => e.id === t ? R(i.updateCrewVendor, L.vendor) : e) }));
460
+ e((e) => ({ vendors: e.vendors.map((e) => e.id === t ? I(i.updateCrewVendor, F.vendor) : e) }));
458
461
  },
459
462
  removeVendor: async (t) => {
460
463
  let n = $.getState().initParams;
461
- await W(ne, { id: t }, n, "Unable to remove vendor"), e((e) => ({ vendors: e.vendors.filter((e) => e.id !== t) }));
464
+ await H(ne, { id: t }, n, "Unable to remove vendor"), e((e) => ({ vendors: e.vendors.filter((e) => e.id !== t) }));
462
465
  },
463
466
  addClient: async (t) => {
464
- let n = $.getState().initParams, r = await W(re, { input: {
467
+ let n = $.getState().initParams, r = await H(re, { input: {
465
468
  ...t,
466
- status: I(t.status)
469
+ status: P(t.status)
467
470
  } }, n, "Unable to create client");
468
- e((e) => ({ clients: [R(r.createCrewClient, L.client), ...e.clients] }));
471
+ e((e) => ({ clients: [I(r.createCrewClient, F.client), ...e.clients] }));
469
472
  },
470
473
  updateClient: async (t, n) => {
471
- let r = $.getState().initParams, i = await W(ie, {
474
+ let r = $.getState().initParams, i = await H(ie, {
472
475
  id: t,
473
476
  input: {
474
477
  ...n,
475
- ...n.status ? { status: I(n.status) } : {}
478
+ ...n.status ? { status: P(n.status) } : {}
476
479
  }
477
480
  }, r, "Unable to update client");
478
- e((e) => ({ clients: e.clients.map((e) => e.id === t ? R(i.updateCrewClient, L.client) : e) }));
481
+ e((e) => ({ clients: e.clients.map((e) => e.id === t ? I(i.updateCrewClient, F.client) : e) }));
479
482
  },
480
483
  removeClient: async (t) => {
481
484
  let n = $.getState().initParams;
482
- await W(ae, { id: t }, n, "Unable to remove client"), e((e) => ({ clients: e.clients.filter((e) => e.id !== t) }));
485
+ await H(ae, { id: t }, n, "Unable to remove client"), e((e) => ({ clients: e.clients.filter((e) => e.id !== t) }));
483
486
  },
484
487
  addTeam: async (t) => {
485
- let n = $.getState().initParams, r = await W(oe, { input: t }, n, "Unable to create team");
486
- e((e) => ({ teams: [R(r.createCrewTeam, L.team), ...e.teams] }));
488
+ let n = $.getState().initParams, r = await H(oe, { input: t }, n, "Unable to create team");
489
+ e((e) => ({ teams: [I(r.createCrewTeam, F.team), ...e.teams] }));
487
490
  },
488
491
  updateTeam: async (t, n) => {
489
- let r = $.getState().initParams, i = await W(se, {
492
+ let r = $.getState().initParams, i = await H(se, {
490
493
  id: t,
491
494
  input: n
492
495
  }, r, "Unable to update team");
493
- e((e) => ({ teams: e.teams.map((e) => e.id === t ? R(i.updateCrewTeam, L.team) : e) }));
496
+ e((e) => ({ teams: e.teams.map((e) => e.id === t ? I(i.updateCrewTeam, F.team) : e) }));
494
497
  },
495
498
  removeTeam: async (t) => {
496
499
  let n = $.getState().initParams;
497
- await W(ce, { id: t }, n, "Unable to remove team"), e((e) => ({ teams: e.teams.filter((e) => e.id !== t) }));
500
+ await H(ce, { id: t }, n, "Unable to remove team"), e((e) => ({ teams: e.teams.filter((e) => e.id !== t) }));
498
501
  },
499
502
  addProject: async (t) => {
500
- let n = $.getState().initParams, r = await W(le, { input: {
503
+ let n = $.getState().initParams, r = await H(le, { input: {
501
504
  ...t,
502
- status: I(t.status),
503
- priority: I(t.priority)
505
+ status: P(t.status),
506
+ priority: P(t.priority)
504
507
  } }, n, "Unable to create project");
505
- e((e) => ({ projects: [R(r.createCrewProject, L.project), ...e.projects] }));
508
+ e((e) => ({ projects: [I(r.createCrewProject, F.project), ...e.projects] }));
506
509
  },
507
510
  updateProject: async (t, n) => {
508
- let r = $.getState().initParams, i = await W(ue, {
511
+ let r = $.getState().initParams, i = await H(ue, {
509
512
  id: t,
510
513
  input: {
511
514
  ...n,
512
- ...n.status ? { status: I(n.status) } : {},
513
- ...n.priority ? { priority: I(n.priority) } : {}
515
+ ...n.status ? { status: P(n.status) } : {},
516
+ ...n.priority ? { priority: P(n.priority) } : {}
514
517
  }
515
518
  }, r, "Unable to update project");
516
- e((e) => ({ projects: e.projects.map((e) => e.id === t ? R(i.updateCrewProject, L.project) : e) }));
519
+ e((e) => ({ projects: e.projects.map((e) => e.id === t ? I(i.updateCrewProject, F.project) : e) }));
517
520
  },
518
521
  removeProject: async (t) => {
519
522
  let n = $.getState().initParams;
520
- await W(de, { id: t }, n, "Unable to remove project"), e((e) => ({ projects: e.projects.filter((e) => e.id !== t) }));
523
+ await H(de, { id: t }, n, "Unable to remove project"), e((e) => ({ projects: e.projects.filter((e) => e.id !== t) }));
521
524
  },
522
525
  addDepartment: async (t) => {
523
- let n = $.getState().initParams, r = await W(fe, { input: t }, n, "Unable to create department");
524
- e((e) => ({ departments: [R(r.createCrewDepartment, L.department), ...e.departments] }));
526
+ let n = $.getState().initParams, r = await H(fe, { input: t }, n, "Unable to create department");
527
+ e((e) => ({ departments: [I(r.createCrewDepartment, F.department), ...e.departments] }));
525
528
  },
526
529
  updateDepartment: async (t, n) => {
527
- let r = $.getState().initParams, i = await W(pe, {
530
+ let r = $.getState().initParams, i = await H(pe, {
528
531
  id: t,
529
532
  input: n
530
533
  }, r, "Unable to update department");
531
- e((e) => ({ departments: e.departments.map((e) => e.id === t ? R(i.updateCrewDepartment, L.department) : e) }));
534
+ e((e) => ({ departments: e.departments.map((e) => e.id === t ? I(i.updateCrewDepartment, F.department) : e) }));
532
535
  },
533
536
  removeDepartment: async (t) => {
534
537
  let n = $.getState().initParams;
535
- await W(me, { id: t }, n, "Unable to remove department"), e((e) => ({ departments: e.departments.filter((e) => e.id !== t) }));
538
+ await H(me, { id: t }, n, "Unable to remove department"), e((e) => ({ departments: e.departments.filter((e) => e.id !== t) }));
536
539
  },
537
540
  addPayrollRecord: async (t) => {
538
- let n = $.getState().initParams, r = await W(he, { input: {
541
+ let n = $.getState().initParams, r = await H(he, { input: {
539
542
  ...t,
540
- status: I(t.status)
543
+ status: P(t.status)
541
544
  } }, n, "Unable to create payroll record");
542
- e((e) => ({ payrollRecords: [R(r.createCrewPayrollRecord, L.payrollRecord), ...e.payrollRecords] }));
545
+ e((e) => ({ payrollRecords: [I(r.createCrewPayrollRecord, F.payrollRecord), ...e.payrollRecords] }));
543
546
  },
544
547
  updatePayrollRecord: async (t, n) => {
545
- let r = $.getState().initParams, i = await W(ge, {
548
+ let r = $.getState().initParams, i = await H(ge, {
546
549
  id: t,
547
550
  input: {
548
551
  ...n,
549
- ...n.status ? { status: I(n.status) } : {}
552
+ ...n.status ? { status: P(n.status) } : {}
550
553
  }
551
554
  }, r, "Unable to update payroll record");
552
- e((e) => ({ payrollRecords: e.payrollRecords.map((e) => e.id === t ? R(i.updateCrewPayrollRecord, L.payrollRecord) : e) }));
555
+ e((e) => ({ payrollRecords: e.payrollRecords.map((e) => e.id === t ? I(i.updateCrewPayrollRecord, F.payrollRecord) : e) }));
553
556
  },
554
557
  removePayrollRecord: async (t) => {
555
558
  let n = $.getState().initParams;
556
- await W(_e, { id: t }, n, "Unable to remove payroll record"), e((e) => ({ payrollRecords: e.payrollRecords.filter((e) => e.id !== t) }));
559
+ await H(_e, { id: t }, n, "Unable to remove payroll record"), e((e) => ({ payrollRecords: e.payrollRecords.filter((e) => e.id !== t) }));
557
560
  },
558
561
  addTimeEntry: async (t) => {
559
- let n = $.getState().initParams, r = await W(we, { input: t }, n, "Unable to create time entry");
560
- e((e) => ({ timeEntries: [R(r.createCrewTimeEntry, L.timeEntry), ...e.timeEntries] }));
562
+ let n = $.getState().initParams, r = await H(we, { input: t }, n, "Unable to create time entry");
563
+ e((e) => ({ timeEntries: [I(r.createCrewTimeEntry, F.timeEntry), ...e.timeEntries] }));
561
564
  },
562
565
  updateTimeEntry: async (t, n) => {
563
- let r = $.getState().initParams, i = await W(Te, {
566
+ let r = $.getState().initParams, i = await H(Te, {
564
567
  id: t,
565
568
  input: n
566
569
  }, r, "Unable to update time entry");
567
- e((e) => ({ timeEntries: e.timeEntries.map((e) => e.id === t ? R(i.updateCrewTimeEntry, L.timeEntry) : e) }));
570
+ e((e) => ({ timeEntries: e.timeEntries.map((e) => e.id === t ? I(i.updateCrewTimeEntry, F.timeEntry) : e) }));
568
571
  },
569
572
  removeTimeEntry: async (t) => {
570
573
  let n = $.getState().initParams;
571
- await W(C, { id: t }, n, "Unable to remove time entry"), e((e) => ({ timeEntries: e.timeEntries.filter((e) => e.id !== t) }));
574
+ await H(Ee, { id: t }, n, "Unable to remove time entry"), e((e) => ({ timeEntries: e.timeEntries.filter((e) => e.id !== t) }));
572
575
  },
573
576
  fetchJobPostingMatches: async (t) => {
574
577
  let n = $.getState().initParams;
575
578
  e({ jobPostingMatchesLoading: !0 });
576
579
  try {
577
- let r = (await W(w, { jobPostingId: t }, n, "Unable to load candidate matches")).crewJobPostingMatches.map((e) => ({
580
+ let r = (await H(De, { jobPostingId: t }, n, "Unable to load candidate matches")).crewJobPostingMatches.map((e) => ({
578
581
  ...e,
579
- candidate: R(e.candidate, L.candidate)
582
+ candidate: I(e.candidate, F.candidate)
580
583
  }));
581
584
  e((e) => ({
582
585
  jobPostingMatches: {
@@ -594,7 +597,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
594
597
  e({ payrollRunsLoading: !0 });
595
598
  try {
596
599
  e({
597
- payrollRuns: (await W(ve, void 0, t, "Unable to load payroll runs")).crewPayrollRuns,
600
+ payrollRuns: (await H(ve, void 0, t, "Unable to load payroll runs")).crewPayrollRuns,
598
601
  payrollRunsLoaded: !0,
599
602
  payrollRunsLoading: !1
600
603
  });
@@ -603,23 +606,23 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
603
606
  }
604
607
  },
605
608
  createPayrollRun: async (t) => {
606
- let n = $.getState().initParams, r = await W(ye, { input: t }, n, "Unable to create payroll run");
609
+ let n = $.getState().initParams, r = await H(ye, { input: t }, n, "Unable to create payroll run");
607
610
  e((e) => ({ payrollRuns: [r.createCrewPayrollRun, ...e.payrollRuns] }));
608
611
  },
609
612
  calculatePayrollRun: async (t) => {
610
- let n = $.getState().initParams, r = await W(be, { id: t }, n, "Unable to calculate payroll run");
613
+ let n = $.getState().initParams, r = await H(be, { id: t }, n, "Unable to calculate payroll run");
611
614
  e((e) => ({
612
615
  payrollRuns: e.payrollRuns.map((e) => e.id === t ? r.calculateCrewPayrollRun : e),
613
616
  payslipsByRun: Object.fromEntries(Object.entries(e.payslipsByRun).filter(([e]) => e !== t))
614
617
  }));
615
618
  },
616
619
  approvePayrollRun: async (t) => {
617
- let n = $.getState().initParams, r = await W(xe, { id: t }, n, "Unable to approve payroll run");
620
+ let n = $.getState().initParams, r = await H(xe, { id: t }, n, "Unable to approve payroll run");
618
621
  e((e) => ({ payrollRuns: e.payrollRuns.map((e) => e.id === t ? r.approveCrewPayrollRun : e) }));
619
622
  },
620
623
  removePayrollRun: async (t) => {
621
624
  let n = $.getState().initParams;
622
- await W(Se, { id: t }, n, "Unable to remove payroll run"), e((e) => ({
625
+ await H(Se, { id: t }, n, "Unable to remove payroll run"), e((e) => ({
623
626
  payrollRuns: e.payrollRuns.filter((e) => e.id !== t),
624
627
  payslipsByRun: Object.fromEntries(Object.entries(e.payslipsByRun).filter(([e]) => e !== t))
625
628
  }));
@@ -628,7 +631,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
628
631
  let n = $.getState().initParams;
629
632
  e({ payslipsLoading: !0 });
630
633
  try {
631
- let r = await W(Ce, { filter: { payrollRunId: t } }, n, "Unable to load payslips");
634
+ let r = await H(Ce, { filter: { payrollRunId: t } }, n, "Unable to load payslips");
632
635
  e((e) => ({
633
636
  payslipsByRun: {
634
637
  ...e.payslipsByRun,
@@ -641,11 +644,11 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
641
644
  }
642
645
  },
643
646
  fetchEmployeeDocuments: async (t) => {
644
- let n = $.getState().initParams, r = await W(E, { employeeId: t }, n, "Unable to load employee documents");
647
+ let n = $.getState().initParams, r = await H(w, { employeeId: t }, n, "Unable to load employee documents");
645
648
  e((e) => ({ employeeDocuments: [...e.employeeDocuments.filter((e) => e.employeeId !== t), ...r.employeeDocuments] }));
646
649
  },
647
650
  uploadEmployeeDocument: async ({ employeeId: t, file: n, title: r, category: i }) => {
648
- let a = $.getState().initParams, o = await W(Ee, { path: "/CrewFoundry/Employee Documents" }, a, "Unable to resolve the employee documents folder"), s = n.name.includes(".") ? n.name.substring(n.name.lastIndexOf(".") + 1) : "", c = await W(De, { input: {
651
+ let a = $.getState().initParams, o = await H(Oe, { path: "/CrewFoundry/Employee Documents" }, a, "Unable to resolve the employee documents folder"), s = n.name.includes(".") ? n.name.substring(n.name.lastIndexOf(".") + 1) : "", c = await H(ke, { input: {
649
652
  fileName: n.name,
650
653
  fileSize: String(n.size),
651
654
  mimeType: n.type || "application/octet-stream",
@@ -660,9 +663,9 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
660
663
  });
661
664
  if (!e.ok) throw Error(`Failed to upload file bytes (status ${e.status})`);
662
665
  }
663
- let l = await W(D, { input: {
666
+ let l = await H(T, { input: {
664
667
  employeeId: t,
665
- fileId: (await W(Oe, { input: {
668
+ fileId: (await H(Ae, { input: {
666
669
  sessionId: c.initiateUpload.session.id,
667
670
  fileSize: String(n.size),
668
671
  folderId: o.ensureFolderByPath.id
@@ -674,32 +677,32 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
674
677
  },
675
678
  detachEmployeeDocument: async (t) => {
676
679
  let n = $.getState().initParams;
677
- await W(O, { id: t }, n, "Unable to remove this document"), e((e) => ({ employeeDocuments: e.employeeDocuments.filter((e) => e.id !== t) }));
680
+ await H(E, { id: t }, n, "Unable to remove this document"), e((e) => ({ employeeDocuments: e.employeeDocuments.filter((e) => e.id !== t) }));
678
681
  },
679
682
  fetchOnboardings: async () => {
680
683
  let t = $.getState().initParams;
681
684
  e({
682
- onboardings: (await W(ke, {}, t, "Unable to load onboarding")).crewOnboardings.map(z),
685
+ onboardings: (await H(je, {}, t, "Unable to load onboarding")).crewOnboardings.map(L),
683
686
  onboardingsLoaded: !0
684
687
  });
685
688
  },
686
689
  createOnboarding: async (t) => {
687
- let n = $.getState().initParams, r = await W(Ae, { input: t }, n, "Unable to start onboarding");
688
- e((e) => ({ onboardings: [z(r.createCrewOnboarding), ...e.onboardings] }));
690
+ let n = $.getState().initParams, r = await H(Me, { input: t }, n, "Unable to start onboarding");
691
+ e((e) => ({ onboardings: [L(r.createCrewOnboarding), ...e.onboardings] }));
689
692
  },
690
693
  updateOnboarding: async (t, n) => {
691
- let r = $.getState().initParams, i = await W(je, {
694
+ let r = $.getState().initParams, i = await H(Ne, {
692
695
  id: t,
693
696
  input: n
694
697
  }, r, "Unable to update onboarding");
695
- e((e) => ({ onboardings: e.onboardings.map((e) => e.id === t ? z(i.updateCrewOnboarding) : e) }));
698
+ e((e) => ({ onboardings: e.onboardings.map((e) => e.id === t ? L(i.updateCrewOnboarding) : e) }));
696
699
  },
697
700
  removeOnboarding: async (t) => {
698
701
  let n = $.getState().initParams;
699
- await W(Me, { id: t }, n, "Unable to remove onboarding"), e((e) => ({ onboardings: e.onboardings.filter((e) => e.id !== t) }));
702
+ await H(Pe, { id: t }, n, "Unable to remove onboarding"), e((e) => ({ onboardings: e.onboardings.filter((e) => e.id !== t) }));
700
703
  },
701
704
  createOnboardingTask: async (t) => {
702
- let n = $.getState().initParams, r = R((await W(Ne, { input: t }, n, "Unable to create onboarding task")).createCrewOnboardingTask, L.onboardingTask);
705
+ let n = $.getState().initParams, r = I((await H(Fe, { input: t }, n, "Unable to create onboarding task")).createCrewOnboardingTask, F.onboardingTask);
703
706
  e((e) => ({ onboardings: e.onboardings.map((e) => e.id === r.onboardingId ? {
704
707
  ...e,
705
708
  tasks: [...e.tasks, r],
@@ -707,10 +710,10 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
707
710
  } : e) }));
708
711
  },
709
712
  updateOnboardingTask: async (t, n) => {
710
- let r = $.getState().initParams, i = R((await W(Pe, {
713
+ let r = $.getState().initParams, i = I((await H(Ie, {
711
714
  id: t,
712
715
  input: n
713
- }, r, "Unable to update onboarding task")).updateCrewOnboardingTask, L.onboardingTask);
716
+ }, r, "Unable to update onboarding task")).updateCrewOnboardingTask, F.onboardingTask);
714
717
  e((e) => ({ onboardings: e.onboardings.map((e) => e.id === i.onboardingId ? {
715
718
  ...e,
716
719
  tasks: e.tasks.map((e) => e.id === t ? i : e)
@@ -718,17 +721,17 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
718
721
  },
719
722
  removeOnboardingTask: async (t) => {
720
723
  let n = $.getState().initParams;
721
- await W(Fe, { id: t }, n, "Unable to remove onboarding task"), e((e) => ({ onboardings: e.onboardings.map((e) => e.tasks.some((e) => e.id === t) ? {
724
+ await H(Le, { id: t }, n, "Unable to remove onboarding task"), e((e) => ({ onboardings: e.onboardings.map((e) => e.tasks.some((e) => e.id === t) ? {
722
725
  ...e,
723
726
  tasks: e.tasks.filter((e) => e.id !== t),
724
727
  totalTaskCount: Math.max(0, e.totalTaskCount - 1)
725
728
  } : e) }));
726
729
  },
727
730
  toggleOnboardingTask: async (t, n) => {
728
- let r = $.getState().initParams, i = R((await W(Ie, {
731
+ let r = $.getState().initParams, i = I((await H(Re, {
729
732
  id: t,
730
733
  completed: n
731
- }, r, "Unable to update onboarding task")).toggleCrewOnboardingTask, L.onboardingTask);
734
+ }, r, "Unable to update onboarding task")).toggleCrewOnboardingTask, F.onboardingTask);
732
735
  e((e) => ({ onboardings: e.onboardings.map((e) => {
733
736
  if (e.id !== i.onboardingId) return e;
734
737
  let n = e.tasks.map((e) => e.id === t ? i : e), r = n.filter((e) => e.completedAt).length;
@@ -743,107 +746,119 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
743
746
  fetchSkillsGap: async () => {
744
747
  let t = $.getState().initParams;
745
748
  e({
746
- skillsGap: (await W(T, void 0, t, "Unable to load skills coverage")).crewSkillsGap,
749
+ skillsGap: (await H(C, void 0, t, "Unable to load skills coverage")).crewSkillsGap,
747
750
  skillsGapLoaded: !0
748
751
  });
749
752
  },
750
753
  fetchLearning: async () => {
751
754
  let t = $.getState().initParams, n = {
752
- limit: F,
755
+ limit: N,
753
756
  offset: 0
754
- }, r = await W(Le, {
755
- coursePage: n,
756
- enrollmentPage: n
757
- }, t, "Unable to load learning"), [i, a] = await Promise.all([K(Re, "crewTrainingCourses", t, "Unable to load courses", r.crewTrainingCourses), K(ze, "crewEnrollments", t, "Unable to load enrollments", r.crewEnrollments)]);
758
- e({
759
- trainingCourses: i,
760
- enrollments: a.map(q),
761
- trainingCompletion: r.crewTrainingCompletionDashboard,
762
- learningLoaded: !0
763
- });
757
+ };
758
+ for (let r = 1; r <= K; r += 1) {
759
+ let i = G.learning, a = await H(ze, {
760
+ coursePage: n,
761
+ enrollmentPage: n
762
+ }, t, "Unable to load learning"), [o, s] = await Promise.all([W(Be, "crewTrainingCourses", t, "Unable to load courses", a.crewTrainingCourses), W(Ve, "crewEnrollments", t, "Unable to load enrollments", a.crewEnrollments)]);
763
+ if (!(i !== G.learning && r < K)) {
764
+ e({
765
+ trainingCourses: o,
766
+ enrollments: s.map(q),
767
+ trainingCompletion: a.crewTrainingCompletionDashboard,
768
+ learningLoaded: !0
769
+ });
770
+ return;
771
+ }
772
+ }
764
773
  },
765
774
  createTrainingCourse: async (t) => {
766
- let n = $.getState().initParams, r = (await W(Ve, { input: t }, n, "Unable to create course")).createCrewTrainingCourse;
767
- return e((e) => ({ trainingCourses: [r, ...e.trainingCourses] })), r;
775
+ let n = $.getState().initParams, r = (await H(Ue, { input: t }, n, "Unable to create course")).createCrewTrainingCourse;
776
+ return G.learning += 1, e((e) => ({ trainingCourses: [r, ...e.trainingCourses] })), r;
768
777
  },
769
778
  updateTrainingCourse: async (t, n) => {
770
- let r = $.getState().initParams, i = await W(He, {
779
+ let r = $.getState().initParams, i = await H(We, {
771
780
  id: t,
772
781
  input: n
773
782
  }, r, "Unable to update course");
774
- e((e) => ({ trainingCourses: Z(e.trainingCourses, i.updateCrewTrainingCourse) }));
783
+ G.learning += 1, e((e) => ({ trainingCourses: Z(e.trainingCourses, i.updateCrewTrainingCourse) }));
775
784
  },
776
785
  removeTrainingCourse: async (t) => {
777
786
  let n = $.getState().initParams;
778
- await W(Ue, { id: t }, n, "Unable to remove course"), e((e) => ({
787
+ await H(Ge, { id: t }, n, "Unable to remove course"), G.learning += 1, e((e) => ({
779
788
  trainingCourses: e.trainingCourses.filter((e) => e.id !== t),
780
789
  trainingCompletion: e.trainingCompletion.filter((e) => e.courseId !== t)
781
790
  }));
782
791
  },
783
792
  enrollEmployee: async (t, n) => {
784
- let r = $.getState().initParams, i = q((await W(We, { input: {
793
+ let r = $.getState().initParams, i = q((await H(Ke, { input: {
785
794
  courseId: t,
786
795
  employeeId: n.id,
787
796
  employeeName: `${n.firstName} ${n.lastName}`.trim()
788
797
  } }, r, "Unable to enroll employee")).createCrewEnrollment);
789
- e((e) => ({ enrollments: e.enrollments.some((e) => e.id === i.id) ? Z(e.enrollments, i) : [i, ...e.enrollments] }));
798
+ G.learning += 1, e((e) => ({ enrollments: e.enrollments.some((e) => e.id === i.id) ? Z(e.enrollments, i) : [i, ...e.enrollments] }));
790
799
  let a = await Q(r);
791
800
  a && e({ trainingCompletion: a });
792
801
  },
793
802
  updateEnrollmentStatus: async (t, n) => {
794
- let r = $.getState().initParams, i = await W(Ge, {
803
+ let r = $.getState().initParams, i = await H(qe, {
795
804
  id: t,
796
- status: I(n)
805
+ status: P(n)
797
806
  }, r, "Unable to update enrollment");
798
- e((e) => ({ enrollments: Z(e.enrollments, q(i.updateCrewEnrollmentStatus)) }));
807
+ G.learning += 1, e((e) => ({ enrollments: Z(e.enrollments, q(i.updateCrewEnrollmentStatus)) }));
799
808
  let a = await Q(r);
800
809
  a && e({ trainingCompletion: a });
801
810
  },
802
811
  removeEnrollment: async (t) => {
803
812
  let n = $.getState().initParams;
804
- await W(Ke, { id: t }, n, "Unable to remove enrollment"), e((e) => ({ enrollments: e.enrollments.filter((e) => e.id !== t) }));
813
+ await H(Je, { id: t }, n, "Unable to remove enrollment"), G.learning += 1, e((e) => ({ enrollments: e.enrollments.filter((e) => e.id !== t) }));
805
814
  let r = await Q(n);
806
815
  r && e({ trainingCompletion: r });
807
816
  },
808
817
  fetchMarketplace: async () => {
809
- let t = $.getState().initParams, [n, r] = await Promise.all([K(qe, "crewServiceListings", t, "Unable to load marketplace services"), K(Je, "crewBookings", t, "Unable to load bookings")]);
810
- e({
811
- serviceListings: n.map(J),
812
- bookings: r.map(Y),
813
- marketplaceLoaded: !0
814
- });
818
+ let t = $.getState().initParams;
819
+ for (let n = 1; n <= K; n += 1) {
820
+ let r = G.marketplace, [i, a] = await Promise.all([W(Ye, "crewServiceListings", t, "Unable to load marketplace services"), W(Xe, "crewBookings", t, "Unable to load bookings")]);
821
+ if (!(r !== G.marketplace && n < K)) {
822
+ e({
823
+ serviceListings: i.map(J),
824
+ bookings: a.map(Y),
825
+ marketplaceLoaded: !0
826
+ });
827
+ return;
828
+ }
829
+ }
815
830
  },
816
831
  createServiceListing: async (t) => {
817
- let n = $.getState().initParams, r = J((await W(Xe, { input: t }, n, "Unable to publish service")).createCrewServiceListing);
818
- return e((e) => ({ serviceListings: [r, ...e.serviceListings] })), r;
832
+ let n = $.getState().initParams, r = J((await H(Qe, { input: t }, n, "Unable to publish service")).createCrewServiceListing);
833
+ return G.marketplace += 1, e((e) => ({ serviceListings: [r, ...e.serviceListings] })), r;
819
834
  },
820
835
  updateServiceListing: async (t, n) => {
821
- let r = $.getState().initParams, i = await W(P, {
836
+ let r = $.getState().initParams, i = await H($e, {
822
837
  id: t,
823
838
  input: n.status ? {
824
839
  ...n,
825
- status: I(n.status)
840
+ status: P(n.status)
826
841
  } : n
827
842
  }, r, "Unable to update service");
828
- e((e) => ({ serviceListings: Z(e.serviceListings, J(i.updateMyServiceListing)) }));
843
+ G.marketplace += 1, e((e) => ({ serviceListings: Z(e.serviceListings, J(i.updateMyServiceListing)) }));
829
844
  },
830
845
  removeServiceListing: async (t) => {
831
846
  let n = $.getState().initParams;
832
- await W(Ze, { id: t }, n, "Unable to remove service"), e((e) => ({ serviceListings: e.serviceListings.filter((e) => e.id !== t) }));
847
+ await H(et, { id: t }, n, "Unable to remove service"), G.marketplace += 1, e((e) => ({ serviceListings: e.serviceListings.filter((e) => e.id !== t) }));
833
848
  },
834
849
  bookServiceListing: async (t) => {
835
- let n = $.getState().initParams, r = Y((await W(Qe, { input: t }, n, "Unable to book service")).createCrewBooking);
836
- return e((e) => ({
850
+ let n = $.getState().initParams, r = Y((await H(M, { input: t }, n, "Unable to book service")).createCrewBooking);
851
+ return G.marketplace += 1, e((e) => ({
837
852
  bookings: [r, ...e.bookings],
838
853
  escrowLoaded: !1
839
854
  })), r;
840
855
  },
841
856
  updateBookingStatus: async (t, n) => {
842
- let r = $.getState().initParams, i = await W($e, {
857
+ let r = $.getState().initParams, i = await H(tt, {
843
858
  id: t,
844
- status: I(n)
859
+ status: P(n)
845
860
  }, r, "Unable to update booking");
846
- e((e) => ({
861
+ G.marketplace += 1, e((e) => ({
847
862
  bookings: Z(e.bookings, Y(i.updateMyBookingStatus)),
848
863
  escrowLoaded: !1
849
864
  }));
@@ -852,7 +867,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
852
867
  let t = $.getState().initParams;
853
868
  try {
854
869
  e({
855
- escrowRecords: (await K(Ye, "crewEscrowRecords", t, "Unable to load escrow records")).map(X),
870
+ escrowRecords: (await W(Ze, "crewEscrowRecords", t, "Unable to load escrow records")).map(X),
856
871
  escrowLoaded: !0,
857
872
  escrowError: null
858
873
  });
@@ -865,15 +880,15 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
865
880
  }
866
881
  },
867
882
  releaseEscrowRecord: async (t) => {
868
- let n = $.getState().initParams, r = await W(et, { id: t }, n, "Unable to release escrow");
883
+ let n = $.getState().initParams, r = await H(nt, { id: t }, n, "Unable to release escrow");
869
884
  e((e) => ({ escrowRecords: Z(e.escrowRecords, X(r.releaseCrewEscrowRecord)) }));
870
885
  },
871
886
  cancelEscrowRecord: async (t) => {
872
- let n = $.getState().initParams, r = await W(tt, { id: t }, n, "Unable to cancel escrow");
887
+ let n = $.getState().initParams, r = await H(rt, { id: t }, n, "Unable to cancel escrow");
873
888
  e((e) => ({ escrowRecords: Z(e.escrowRecords, X(r.cancelCrewEscrowRecord)) }));
874
889
  }
875
890
  }));
876
891
  //#endregion
877
- export { U as CONVERSATIONS_ROUTE, $ as useCrewFoundryStore };
892
+ export { V as CONVERSATIONS_ROUTE, $ as useCrewFoundryStore };
878
893
 
879
894
  //# sourceMappingURL=crewfoundryStore.js.map