@burdenoff/microfe-crewfoundry 2026.1030.2 → 2026.1030.3
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
|
-
import {
|
|
2
|
+
import { clearGraphqlFetchResponseCache as t, graphqlFetch as n } 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 } }", 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 = "query CrewEmployeeSkillProfile($id: ID!) { crewEmployee(id: $id) { id skills skillProfile { id skillId proficiency verifiedFrom lastUsedAt skill { id name category source } } } }", ke = "mutation AttachCrewSkill($input: AttachCrewSkillInput!) { attachCrewSkill(input: $input) { id } }", Ae = "mutation DetachCrewSkill($employeeId: ID!, $skillId: ID!) { detachCrewSkill(employeeId: $employeeId, skillId: $skillId) }", je = "mutation EnsureFolderByPath($path: String!) { ensureFolderByPath(path: $path) { id } }", Me = "mutation InitiateUpload($input: InitiateUploadInput!) { initiateUpload(input: $input) { session { id } uploadUrl } }", Ne = "mutation CompleteUpload($input: CompleteUploadInput!) { completeUpload(input: $input) { file { id } } }", Pe = "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 } } }", Fe = "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 } } }", Ie = "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 } } }", Le = "mutation RemoveCrewOnboarding($id: ID!) { removeCrewOnboarding(id: $id) }", Re = "mutation CreateCrewOnboardingTask($input: CreateCrewOnboardingTaskInput!) { createCrewOnboardingTask(input: $input) { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } }", ze = "mutation UpdateCrewOnboardingTask($id: ID!, $input: UpdateCrewOnboardingTaskInput!) { updateCrewOnboardingTask(id: $id, input: $input) { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } }", Be = "mutation RemoveCrewOnboardingTask($id: ID!) { removeCrewOnboardingTask(id: $id) }", Ve = "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", He = `query CrewLearning($coursePage: PaginationInput, $enrollmentPage: PaginationInput) { crewTrainingCourses(pagination: $coursePage) { ${D} } crewEnrollments(pagination: $enrollmentPage) { ${O} } crewTrainingCompletionDashboard { courseId courseTitle totalEnrolled notStartedCount inProgressCount completedCount completionRate } }`, Ue = `query CrewTrainingCourses($pagination: PaginationInput) { crewTrainingCourses(pagination: $pagination) { ${D} } }`, We = `query CrewEnrollments($pagination: PaginationInput) { crewEnrollments(pagination: $pagination) { ${O} } }`, Ge = "query CrewTrainingCompletionDashboard { crewTrainingCompletionDashboard { courseId courseTitle totalEnrolled notStartedCount inProgressCount completedCount completionRate } }", Ke = `mutation CreateCrewTrainingCourse($input: CreateCrewTrainingCourseInput!) { createCrewTrainingCourse(input: $input) { ${D} } }`, qe = `mutation UpdateCrewTrainingCourse($id: ID!, $input: UpdateCrewTrainingCourseInput!) { updateCrewTrainingCourse(id: $id, input: $input) { ${D} } }`, Je = "mutation RemoveCrewTrainingCourse($id: ID!) { removeCrewTrainingCourse(id: $id) }", Ye = `mutation CreateCrewEnrollment($input: CreateCrewEnrollmentInput!) { createCrewEnrollment(input: $input) { ${O} } }`, Xe = `mutation UpdateCrewEnrollmentStatus($id: ID!, $status: String!) { updateCrewEnrollmentStatus(id: $id, status: $status) { ${O} } }`, Ze = "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", Qe = `query CrewServiceListings($pagination: PaginationInput) { crewServiceListings(pagination: $pagination) { ${k} } }`, $e = `query CrewBookings($pagination: PaginationInput) { crewBookings(pagination: $pagination) { ${A} } }`, et = `query CrewEscrowRecords($pagination: PaginationInput) { crewEscrowRecords(pagination: $pagination) { ${j} } }`, tt = `mutation CreateCrewServiceListing($input: CreateCrewServiceListingInput!) { createCrewServiceListing(input: $input) { ${k} } }`, nt = `mutation UpdateMyServiceListing($id: ID!, $input: UpdateCrewServiceListingInput!) { updateMyServiceListing(id: $id, input: $input) { ${k} } }`, rt = "mutation RemoveMyServiceListing($id: ID!) { removeMyServiceListing(id: $id) }", it = `mutation CreateCrewBooking($input: CreateCrewBookingInput!) { createCrewBooking(input: $input) { ${A} } }`, at = `mutation UpdateMyBookingStatus($id: ID!, $status: String!) { updateMyBookingStatus(id: $id, status: $status) { ${A} } }`, ot = `mutation ReleaseCrewEscrowRecord($id: ID!) { releaseCrewEscrowRecord(id: $id) { ${j} } }`, st = `mutation CancelCrewEscrowRecord($id: ID!) { cancelCrewEscrowRecord(id: $id) { ${j} } }`, M = 100, ct = 10, N = (e) => e.toUpperCase().replaceAll("-", "_"), P = {
|
|
4
|
+
var r = "\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", i = "\n query CrewPayrollRecords {\n crewPayrollRecords { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod }\n }\n", a = "\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", o = "mutation CreateCrewEmployee($input: CreateCrewEmployeeInput!) { createCrewEmployee(input: $input) { id firstName lastName email department position status type salary startDate avatar location managerId phone performanceScore skills terminationDate } }", s = "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 } }", c = "mutation RemoveCrewEmployee($id: ID!) { removeCrewEmployee(id: $id) }", l = "mutation CreateCrewJobPosting($input: CreateCrewJobPostingInput!) { createCrewJobPosting(input: $input) { id title department location type experienceLevel salaryMin salaryMax status applicants postedDate deadline description requirements benefits } }", u = "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 } }", d = "mutation CreateCrewCandidate($input: CreateCrewCandidateInput!) { createCrewCandidate(input: $input) { id firstName lastName email phone position status appliedDate resumeUrl rating source experience skills currentCompany notes hiredDate } }", f = "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 } }", p = "mutation CreateCrewAnnouncement($input: CreateCrewAnnouncementInput!) { createCrewAnnouncement(input: $input) { id title content author authorRole category priority isPinned createdAt viewCount tags } }", m = "mutation CreateCrewLeaveRequest($input: CreateCrewLeaveRequestInput!) { createCrewLeaveRequest(input: $input) { id employeeId employeeName department type startDate endDate days status reason approverName } }", h = "mutation UpdateCrewLeaveRequest($id: ID!, $input: UpdateCrewLeaveRequestInput!) { updateCrewLeaveRequest(id: $id, input: $input) { id employeeId employeeName department type startDate endDate days status reason approverName } }", g = "mutation RemoveCrewJobPosting($id: ID!) { removeCrewJobPosting(id: $id) }", _ = "mutation RemoveCrewCandidate($id: ID!) { removeCrewCandidate(id: $id) }", v = "mutation UpdateCrewAnnouncement($id: ID!, $input: UpdateCrewAnnouncementInput!) { updateCrewAnnouncement(id: $id, input: $input) { id title content author authorRole category priority isPinned createdAt viewCount tags } }", y = "mutation RemoveCrewAnnouncement($id: ID!) { removeCrewAnnouncement(id: $id) }", b = "mutation CreateCrewInterview($input: CreateCrewInterviewInput!) { createCrewInterview(input: $input) { id candidateId candidateName position interviewerName date time type status feedback rating } }", x = "mutation UpdateCrewInterview($id: ID!, $input: UpdateCrewInterviewInput!) { updateCrewInterview(id: $id, input: $input) { id candidateId candidateName position interviewerName date time type status feedback rating } }", ee = "mutation RemoveCrewInterview($id: ID!) { removeCrewInterview(id: $id) }", te = "mutation CreateCrewVendor($input: CreateCrewVendorInput!) { createCrewVendor(input: $input) { id name category contactPerson email phone status contractValue rating } }", ne = "mutation UpdateCrewVendor($id: ID!, $input: UpdateCrewVendorInput!) { updateCrewVendor(id: $id, input: $input) { id name category contactPerson email phone status contractValue rating } }", re = "mutation RemoveCrewVendor($id: ID!) { removeCrewVendor(id: $id) }", ie = "mutation CreateCrewClient($input: CreateCrewClientInput!) { createCrewClient(input: $input) { id name industry contactPerson email phone status revenue projects since } }", ae = "mutation UpdateCrewClient($id: ID!, $input: UpdateCrewClientInput!) { updateCrewClient(id: $id, input: $input) { id name industry contactPerson email phone status revenue projects since } }", oe = "mutation RemoveCrewClient($id: ID!) { removeCrewClient(id: $id) }", se = "mutation CreateCrewTeam($input: CreateCrewTeamInput!) { createCrewTeam(input: $input) { id name description leadId leadName members memberCount department status projectCount createdAt } }", ce = "mutation UpdateCrewTeam($id: ID!, $input: UpdateCrewTeamInput!) { updateCrewTeam(id: $id, input: $input) { id name description leadId leadName members memberCount department status projectCount createdAt } }", le = "mutation RemoveCrewTeam($id: ID!) { removeCrewTeam(id: $id) }", ue = "mutation CreateCrewProject($input: CreateCrewProjectInput!) { createCrewProject(input: $input) { id name description status priority startDate endDate progress budget spent teamId teamName managerId managerName tasks completedTasks } }", de = "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 } }", fe = "mutation RemoveCrewProject($id: ID!) { removeCrewProject(id: $id) }", pe = "mutation CreateCrewDepartment($input: CreateCrewDepartmentInput!) { createCrewDepartment(input: $input) { id name headId headName employeeCount budget location status } }", me = "mutation UpdateCrewDepartment($id: ID!, $input: UpdateCrewDepartmentInput!) { updateCrewDepartment(id: $id, input: $input) { id name headId headName employeeCount budget location status } }", he = "mutation RemoveCrewDepartment($id: ID!) { removeCrewDepartment(id: $id) }", ge = "mutation CreateCrewPayrollRecord($input: CreateCrewPayrollRecordInput!) { createCrewPayrollRecord(input: $input) { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod } }", _e = "mutation UpdateCrewPayrollRecord($id: ID!, $input: UpdateCrewPayrollRecordInput!) { updateCrewPayrollRecord(id: $id, input: $input) { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod } }", ve = "mutation RemoveCrewPayrollRecord($id: ID!) { removeCrewPayrollRecord(id: $id) }", S = "id country currency period payDate status employeeCount totalGrossPay totalNetPay calculatedAt approvedAt approvedBy notes", ye = `query CrewPayrollRuns { crewPayrollRuns { ${S} } }`, be = `mutation CreateCrewPayrollRun($input: CreateCrewPayrollRunInput!) { createCrewPayrollRun(input: $input) { ${S} } }`, xe = `mutation CalculateCrewPayrollRun($id: ID!) { calculateCrewPayrollRun(id: $id) { ${S} } }`, Se = `mutation ApproveCrewPayrollRun($id: ID!) { approveCrewPayrollRun(id: $id) { ${S} } }`, Ce = "mutation RemoveCrewPayrollRun($id: ID!) { removeCrewPayrollRun(id: $id) }", we = "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 } }", Te = "mutation CreateCrewTimeEntry($input: CreateCrewTimeEntryInput!) { createCrewTimeEntry(input: $input) { id employeeId employeeName date clockIn clockOut totalHours overtime project status billable } }", Ee = "mutation UpdateCrewTimeEntry($id: ID!, $input: UpdateCrewTimeEntryInput!) { updateCrewTimeEntry(id: $id, input: $input) { id employeeId employeeName date clockIn clockOut totalHours overtime project status billable } }", De = "mutation RemoveCrewTimeEntry($id: ID!) { removeCrewTimeEntry(id: $id) }", C = "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 } } }", w = "query CrewSkillsGap { crewSkillsGap { skill employeesWithSkill openJobsRequiringSkill shortage } }", T = "query EmployeeDocuments($employeeId: ID!) { employeeDocuments(employeeId: $employeeId) { id employeeId fileId title category uploadedBy uploadedAt } }", E = "mutation AttachEmployeeDocument($input: AttachCrewEmployeeDocumentInput!) { attachEmployeeDocument(input: $input) { id employeeId fileId title category uploadedBy uploadedAt } }", Oe = "mutation DetachEmployeeDocument($id: ID!) { detachEmployeeDocument(id: $id) }", ke = "query CrewEmployeeSkillProfile($id: ID!) { crewEmployee(id: $id) { id skills skillProfile { id skillId proficiency verifiedFrom lastUsedAt skill { id name category source } } } }", Ae = "mutation AttachCrewSkill($input: AttachCrewSkillInput!) { attachCrewSkill(input: $input) { id } }", je = "mutation DetachCrewSkill($employeeId: ID!, $skillId: ID!) { detachCrewSkill(employeeId: $employeeId, skillId: $skillId) }", Me = "mutation EnsureFolderByPath($path: String!) { ensureFolderByPath(path: $path) { id } }", Ne = "mutation InitiateUpload($input: InitiateUploadInput!) { initiateUpload(input: $input) { session { id } uploadUrl } }", Pe = "mutation CompleteUpload($input: CompleteUploadInput!) { completeUpload(input: $input) { file { id } } }", Fe = "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 } } }", Ie = "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 } } }", Le = "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 } } }", Re = "mutation RemoveCrewOnboarding($id: ID!) { removeCrewOnboarding(id: $id) }", ze = "mutation CreateCrewOnboardingTask($input: CreateCrewOnboardingTaskInput!) { createCrewOnboardingTask(input: $input) { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } }", Be = "mutation UpdateCrewOnboardingTask($id: ID!, $input: UpdateCrewOnboardingTaskInput!) { updateCrewOnboardingTask(id: $id, input: $input) { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } }", Ve = "mutation RemoveCrewOnboardingTask($id: ID!) { removeCrewOnboardingTask(id: $id) }", He = "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", Ue = `query CrewLearning($coursePage: PaginationInput, $enrollmentPage: PaginationInput) { crewTrainingCourses(pagination: $coursePage) { ${D} } crewEnrollments(pagination: $enrollmentPage) { ${O} } crewTrainingCompletionDashboard { courseId courseTitle totalEnrolled notStartedCount inProgressCount completedCount completionRate } }`, We = `query CrewTrainingCourses($pagination: PaginationInput) { crewTrainingCourses(pagination: $pagination) { ${D} } }`, Ge = `query CrewEnrollments($pagination: PaginationInput) { crewEnrollments(pagination: $pagination) { ${O} } }`, Ke = "query CrewTrainingCompletionDashboard { crewTrainingCompletionDashboard { courseId courseTitle totalEnrolled notStartedCount inProgressCount completedCount completionRate } }", qe = `mutation CreateCrewTrainingCourse($input: CreateCrewTrainingCourseInput!) { createCrewTrainingCourse(input: $input) { ${D} } }`, k = `mutation UpdateCrewTrainingCourse($id: ID!, $input: UpdateCrewTrainingCourseInput!) { updateCrewTrainingCourse(id: $id, input: $input) { ${D} } }`, Je = "mutation RemoveCrewTrainingCourse($id: ID!) { removeCrewTrainingCourse(id: $id) }", Ye = `mutation CreateCrewEnrollment($input: CreateCrewEnrollmentInput!) { createCrewEnrollment(input: $input) { ${O} } }`, Xe = `mutation UpdateCrewEnrollmentStatus($id: ID!, $status: String!) { updateCrewEnrollmentStatus(id: $id, status: $status) { ${O} } }`, Ze = "mutation RemoveCrewEnrollment($id: ID!) { removeCrewEnrollment(id: $id) }", A = "id title description category providerActorId providerName rate rateUnit currency status createdAt updatedAt", j = "id listingId listingTitle providerActorId providerName clientActorId clientName status rate rateUnit currency notes scheduledStart scheduledEnd cancelledReason createdAt updatedAt", M = "id bookingId amount currency releaseCondition status heldAt releasedAt releasedBy notes createdAt updatedAt", Qe = `query CrewServiceListings($pagination: PaginationInput) { crewServiceListings(pagination: $pagination) { ${A} } }`, $e = `query CrewBookings($pagination: PaginationInput) { crewBookings(pagination: $pagination) { ${j} } }`, et = `query CrewEscrowRecords($pagination: PaginationInput) { crewEscrowRecords(pagination: $pagination) { ${M} } }`, tt = `mutation CreateCrewServiceListing($input: CreateCrewServiceListingInput!) { createCrewServiceListing(input: $input) { ${A} } }`, nt = `mutation UpdateMyServiceListing($id: ID!, $input: UpdateCrewServiceListingInput!) { updateMyServiceListing(id: $id, input: $input) { ${A} } }`, rt = "mutation RemoveMyServiceListing($id: ID!) { removeMyServiceListing(id: $id) }", it = `mutation CreateCrewBooking($input: CreateCrewBookingInput!) { createCrewBooking(input: $input) { ${j} } }`, at = `mutation UpdateMyBookingStatus($id: ID!, $status: String!) { updateMyBookingStatus(id: $id, status: $status) { ${j} } }`, ot = `mutation ReleaseCrewEscrowRecord($id: ID!) { releaseCrewEscrowRecord(id: $id) { ${M} } }`, st = `mutation CancelCrewEscrowRecord($id: ID!) { cancelCrewEscrowRecord(id: $id) { ${M} } }`, N = 100, ct = 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
|
-
},
|
|
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
|
-
},
|
|
38
|
-
...
|
|
39
|
-
tasks: (e.tasks ?? []).map((e) =>
|
|
40
|
-
}),
|
|
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", lt = (e) => !e || typeof e != "object" || Array.isArray(e) ? null : e, z = (e) => typeof e == "number" ? e : null, B = (e) => typeof e == "string" ? e : null, ut = (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
43
|
}, dt = (e) => {
|
|
44
44
|
let t = e.toLowerCase();
|
|
45
45
|
return t === "active" ? "active" : t === "inactive" || t === "archived" || t === "deleted" ? "disbanded" : "forming";
|
|
46
46
|
}, ft = (e, t) => e.map((e, n) => {
|
|
47
|
-
let r = lt(e.config), i =
|
|
47
|
+
let r = lt(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:
|
|
51
|
+
description: B(r?.description) || `${e.key} delivery plan`,
|
|
52
52
|
status: ut(e.status),
|
|
53
|
-
priority:
|
|
54
|
-
startDate:
|
|
55
|
-
endDate:
|
|
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,
|
|
@@ -74,8 +74,8 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
74
74
|
department: e.groupType?.toLowerCase().replaceAll("_", " ") || "operations",
|
|
75
75
|
status: dt(e.status),
|
|
76
76
|
projectCount: 0,
|
|
77
|
-
createdAt:
|
|
78
|
-
})),
|
|
77
|
+
createdAt: R(e.createdAt)
|
|
78
|
+
})), V = "/conversations", mt = (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:
|
|
87
|
-
})),
|
|
86
|
+
actionUrl: V
|
|
87
|
+
})), ht = (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
|
-
},
|
|
91
|
+
}, gt = new Set([
|
|
92
92
|
"id",
|
|
93
93
|
"createdAt",
|
|
94
94
|
"createdOn",
|
|
@@ -110,44 +110,47 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
110
110
|
"viewCount",
|
|
111
111
|
"revenue",
|
|
112
112
|
"projects"
|
|
113
|
-
]),
|
|
113
|
+
]), _t = (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))
|
|
118
|
+
for (let [e, r] of Object.entries(t)) gt.has(e) || (n[e] = r);
|
|
119
119
|
return {
|
|
120
120
|
...e,
|
|
121
121
|
input: n
|
|
122
122
|
};
|
|
123
|
-
}, H = async (e,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
123
|
+
}, vt = (e) => /^\s*mutation\b/.test(e), H = async (e, r, i, a, o = "workspace") => {
|
|
124
|
+
let s = ht(await n({
|
|
125
|
+
gateway: o,
|
|
126
|
+
query: e,
|
|
127
|
+
variables: _t(r),
|
|
128
|
+
authToken: i.authToken,
|
|
129
|
+
baseUrl: o === "workspace" ? i.apiGatewayUrl : void 0,
|
|
130
|
+
extraHeaders: { ...o === "workspace" && i.workspaceId ? { "x-workspace-id": i.workspaceId } : {} }
|
|
131
|
+
}), a);
|
|
132
|
+
return vt(e) && t(), s;
|
|
133
|
+
}, yt = () => !1, U = async (e, t, n, r, i = "workspace") => {
|
|
131
134
|
try {
|
|
132
135
|
return await H(e, t, n, r, i);
|
|
133
136
|
} catch (e) {
|
|
134
|
-
return
|
|
137
|
+
return yt() && console.warn(`[crewfoundry] overlap query skipped: ${r}`, e), null;
|
|
135
138
|
}
|
|
136
139
|
}, W = async (e, t, n, r, i) => {
|
|
137
140
|
let a = i ? [...i] : [];
|
|
138
|
-
if (i && i.length <
|
|
141
|
+
if (i && i.length < N) return a;
|
|
139
142
|
for (let o = +!!i; o < ct; o += 1) {
|
|
140
143
|
let i = (await H(e, { pagination: {
|
|
141
|
-
limit:
|
|
142
|
-
offset: o *
|
|
144
|
+
limit: N,
|
|
145
|
+
offset: o * N
|
|
143
146
|
} }, n, r))[t] ?? [];
|
|
144
|
-
if (a.push(...i), i.length <
|
|
147
|
+
if (a.push(...i), i.length < N) break;
|
|
145
148
|
}
|
|
146
149
|
return a;
|
|
147
150
|
}, G = {
|
|
148
151
|
learning: 0,
|
|
149
152
|
marketplace: 0
|
|
150
|
-
}, K = 3, q = (e) =>
|
|
153
|
+
}, 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(Ke, void 0, e, "Unable to load training completion"))?.crewTrainingCompletionDashboard ?? null, $ = e((e) => ({
|
|
151
154
|
metrics: [
|
|
152
155
|
{
|
|
153
156
|
label: "Total Employees",
|
|
@@ -250,7 +253,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
250
253
|
initParams: t
|
|
251
254
|
});
|
|
252
255
|
try {
|
|
253
|
-
let [
|
|
256
|
+
let [n, o] = await Promise.all([U(a, {
|
|
254
257
|
workspaceId: t.workspaceId,
|
|
255
258
|
projectPagination: {
|
|
256
259
|
limit: 50,
|
|
@@ -258,7 +261,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
258
261
|
},
|
|
259
262
|
groupFirst: 30,
|
|
260
263
|
conversationFirst: 30
|
|
261
|
-
}, t, "Unable to load workspace bootstrap with overlap data"), U(
|
|
264
|
+
}, t, "Unable to load workspace bootstrap with overlap data"), U(i, void 0, t, "Unable to load payroll records")]), s = n ? n.crewfoundryBootstrap : (await H(r, void 0, t, "Unable to load CrewFoundry data")).crewfoundryBootstrap, c = n ? pt(n.groups.edges) : [], l = n ? ft(n.projects.items, c) : [], u = n ? mt(n.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));
|
|
262
265
|
e({
|
|
263
266
|
employees: m,
|
|
264
267
|
departments: h,
|
|
@@ -268,12 +271,12 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
268
271
|
announcements: y,
|
|
269
272
|
teams: b,
|
|
270
273
|
projects: x,
|
|
271
|
-
payrollRecords: (o?.crewPayrollRecords ?? []).map((e) =>
|
|
272
|
-
leaveRequests: s.leaveRequests.map((e) =>
|
|
273
|
-
timeEntries: s.timeEntries.map((e) =>
|
|
274
|
-
notifications: p.map((e) =>
|
|
275
|
-
vendors: s.vendors.map((e) =>
|
|
276
|
-
clients: s.clients.map((e) =>
|
|
274
|
+
payrollRecords: (o?.crewPayrollRecords ?? []).map((e) => I(e, F.payrollRecord)),
|
|
275
|
+
leaveRequests: s.leaveRequests.map((e) => I(e, F.leaveRequest)),
|
|
276
|
+
timeEntries: s.timeEntries.map((e) => I(e, F.timeEntry)),
|
|
277
|
+
notifications: p.map((e) => I(e, F.notification)),
|
|
278
|
+
vendors: s.vendors.map((e) => I(e, F.vendor)),
|
|
279
|
+
clients: s.clients.map((e) => I(e, F.client)),
|
|
277
280
|
metrics: [
|
|
278
281
|
{
|
|
279
282
|
label: "Total Employees",
|
|
@@ -310,84 +313,84 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
310
313
|
setSelectedView: (t) => e({ selectedView: t }),
|
|
311
314
|
setWorkItems: (t) => e({ workItems: t }),
|
|
312
315
|
addEmployee: async (t) => {
|
|
313
|
-
let n = $.getState().initParams, r = await H(
|
|
316
|
+
let n = $.getState().initParams, r = await H(o, { input: {
|
|
314
317
|
...t,
|
|
315
|
-
status:
|
|
316
|
-
type:
|
|
318
|
+
status: P(t.status),
|
|
319
|
+
type: P(t.type)
|
|
317
320
|
} }, n, "Unable to create employee");
|
|
318
|
-
e((e) => ({ employees: [
|
|
321
|
+
e((e) => ({ employees: [I(r.createCrewEmployee, F.employee), ...e.employees] }));
|
|
319
322
|
},
|
|
320
323
|
updateEmployee: async (t, n) => {
|
|
321
|
-
let r = $.getState().initParams, i = await H(
|
|
324
|
+
let r = $.getState().initParams, i = await H(s, {
|
|
322
325
|
id: t,
|
|
323
326
|
input: {
|
|
324
327
|
...n,
|
|
325
|
-
...n.status ? { status:
|
|
326
|
-
...n.type ? { type:
|
|
328
|
+
...n.status ? { status: P(n.status) } : {},
|
|
329
|
+
...n.type ? { type: P(n.type) } : {}
|
|
327
330
|
}
|
|
328
331
|
}, r, "Unable to update employee");
|
|
329
|
-
e((e) => ({ employees: e.employees.map((e) => e.id === t ?
|
|
332
|
+
e((e) => ({ employees: e.employees.map((e) => e.id === t ? I(i.updateCrewEmployee, F.employee) : e) }));
|
|
330
333
|
},
|
|
331
334
|
removeEmployee: async (t) => {
|
|
332
335
|
let n = $.getState().initParams;
|
|
333
|
-
await H(
|
|
336
|
+
await H(c, { id: t }, n, "Unable to remove employee"), e((e) => ({ employees: e.employees.filter((e) => e.id !== t) }));
|
|
334
337
|
},
|
|
335
338
|
addJobPosting: async (t) => {
|
|
336
|
-
let n = $.getState().initParams, r = await H(
|
|
339
|
+
let n = $.getState().initParams, r = await H(l, { input: {
|
|
337
340
|
...t,
|
|
338
|
-
status:
|
|
341
|
+
status: P(t.status)
|
|
339
342
|
} }, n, "Unable to create job posting");
|
|
340
|
-
e((e) => ({ jobPostings: [
|
|
343
|
+
e((e) => ({ jobPostings: [I(r.createCrewJobPosting, F.jobPosting), ...e.jobPostings] }));
|
|
341
344
|
},
|
|
342
345
|
updateJobPosting: async (t, n) => {
|
|
343
|
-
let r = $.getState().initParams, i = await H(
|
|
346
|
+
let r = $.getState().initParams, i = await H(u, {
|
|
344
347
|
id: t,
|
|
345
348
|
input: {
|
|
346
349
|
...n,
|
|
347
|
-
...n.status ? { status:
|
|
350
|
+
...n.status ? { status: P(n.status) } : {}
|
|
348
351
|
}
|
|
349
352
|
}, r, "Unable to update job posting");
|
|
350
|
-
e((e) => ({ jobPostings: e.jobPostings.map((e) => e.id === t ?
|
|
353
|
+
e((e) => ({ jobPostings: e.jobPostings.map((e) => e.id === t ? I(i.updateCrewJobPosting, F.jobPosting) : e) }));
|
|
351
354
|
},
|
|
352
355
|
addCandidate: async (t) => {
|
|
353
|
-
let n = $.getState().initParams, r = await H(
|
|
356
|
+
let n = $.getState().initParams, r = await H(d, { input: {
|
|
354
357
|
...t,
|
|
355
|
-
status:
|
|
358
|
+
status: P(t.status)
|
|
356
359
|
} }, n, "Unable to create candidate");
|
|
357
|
-
e((e) => ({ candidates: [
|
|
360
|
+
e((e) => ({ candidates: [I(r.createCrewCandidate, F.candidate), ...e.candidates] }));
|
|
358
361
|
},
|
|
359
362
|
updateCandidate: async (t, n) => {
|
|
360
|
-
let r = $.getState().initParams, i = await H(
|
|
363
|
+
let r = $.getState().initParams, i = await H(f, {
|
|
361
364
|
id: t,
|
|
362
365
|
input: {
|
|
363
366
|
...n,
|
|
364
|
-
...n.status ? { status:
|
|
367
|
+
...n.status ? { status: P(n.status) } : {}
|
|
365
368
|
}
|
|
366
369
|
}, r, "Unable to update candidate");
|
|
367
|
-
e((e) => ({ candidates: e.candidates.map((e) => e.id === t ?
|
|
370
|
+
e((e) => ({ candidates: e.candidates.map((e) => e.id === t ? I(i.updateCrewCandidate, F.candidate) : e) }));
|
|
368
371
|
},
|
|
369
372
|
addAnnouncement: async (t) => {
|
|
370
|
-
let n = $.getState().initParams, r = await H(
|
|
371
|
-
e((e) => ({ announcements: [
|
|
373
|
+
let n = $.getState().initParams, r = await H(p, { input: t }, n, "Unable to create announcement");
|
|
374
|
+
e((e) => ({ announcements: [I(r.createCrewAnnouncement, F.announcement), ...e.announcements] }));
|
|
372
375
|
},
|
|
373
376
|
addLeaveRequest: async (t) => {
|
|
374
|
-
let n = $.getState().initParams, r = await H(
|
|
377
|
+
let n = $.getState().initParams, r = await H(m, { input: {
|
|
375
378
|
...t,
|
|
376
|
-
type:
|
|
377
|
-
status:
|
|
379
|
+
type: P(t.type),
|
|
380
|
+
status: P(t.status)
|
|
378
381
|
} }, n, "Unable to create leave request");
|
|
379
|
-
e((e) => ({ leaveRequests: [
|
|
382
|
+
e((e) => ({ leaveRequests: [I(r.createCrewLeaveRequest, F.leaveRequest), ...e.leaveRequests] }));
|
|
380
383
|
},
|
|
381
384
|
updateLeaveRequest: async (t, n) => {
|
|
382
|
-
let r = $.getState().initParams, i = await H(
|
|
385
|
+
let r = $.getState().initParams, i = await H(h, {
|
|
383
386
|
id: t,
|
|
384
387
|
input: {
|
|
385
388
|
...n,
|
|
386
|
-
...n.type ? { type:
|
|
387
|
-
...n.status ? { status:
|
|
389
|
+
...n.type ? { type: P(n.type) } : {},
|
|
390
|
+
...n.status ? { status: P(n.status) } : {}
|
|
388
391
|
}
|
|
389
392
|
}, r, "Unable to update leave request");
|
|
390
|
-
e((e) => ({ leaveRequests: e.leaveRequests.map((e) => e.id === t ?
|
|
393
|
+
e((e) => ({ leaveRequests: e.leaveRequests.map((e) => e.id === t ? I(i.updateCrewLeaveRequest, F.leaveRequest) : e) }));
|
|
391
394
|
},
|
|
392
395
|
markNotificationRead: async (t) => {
|
|
393
396
|
e((e) => ({ notifications: e.notifications.map((e) => e.id === t ? {
|
|
@@ -403,184 +406,184 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
403
406
|
},
|
|
404
407
|
removeJobPosting: async (t) => {
|
|
405
408
|
let n = $.getState().initParams;
|
|
406
|
-
await H(
|
|
409
|
+
await H(g, { id: t }, n, "Unable to remove job posting"), e((e) => ({ jobPostings: e.jobPostings.filter((e) => e.id !== t) }));
|
|
407
410
|
},
|
|
408
411
|
removeCandidate: async (t) => {
|
|
409
412
|
let n = $.getState().initParams;
|
|
410
|
-
await H(
|
|
413
|
+
await H(_, { id: t }, n, "Unable to remove candidate"), e((e) => ({ candidates: e.candidates.filter((e) => e.id !== t) }));
|
|
411
414
|
},
|
|
412
415
|
updateAnnouncement: async (t, n) => {
|
|
413
|
-
let r = $.getState().initParams, i = await H(
|
|
416
|
+
let r = $.getState().initParams, i = await H(v, {
|
|
414
417
|
id: t,
|
|
415
418
|
input: n
|
|
416
419
|
}, r, "Unable to update announcement");
|
|
417
|
-
e((e) => ({ announcements: e.announcements.map((e) => e.id === t ?
|
|
420
|
+
e((e) => ({ announcements: e.announcements.map((e) => e.id === t ? I(i.updateCrewAnnouncement, F.announcement) : e) }));
|
|
418
421
|
},
|
|
419
422
|
removeAnnouncement: async (t) => {
|
|
420
423
|
let n = $.getState().initParams;
|
|
421
|
-
await H(
|
|
424
|
+
await H(y, { id: t }, n, "Unable to remove announcement"), e((e) => ({ announcements: e.announcements.filter((e) => e.id !== t) }));
|
|
422
425
|
},
|
|
423
426
|
addInterview: async (t) => {
|
|
424
|
-
let n = $.getState().initParams, r = await H(
|
|
427
|
+
let n = $.getState().initParams, r = await H(b, { input: {
|
|
425
428
|
...t,
|
|
426
|
-
type:
|
|
427
|
-
status:
|
|
429
|
+
type: P(t.type),
|
|
430
|
+
status: P(t.status)
|
|
428
431
|
} }, n, "Unable to schedule interview");
|
|
429
|
-
e((e) => ({ interviews: [
|
|
432
|
+
e((e) => ({ interviews: [I(r.createCrewInterview, F.interview), ...e.interviews] }));
|
|
430
433
|
},
|
|
431
434
|
updateInterview: async (t, n) => {
|
|
432
|
-
let r = $.getState().initParams, i = await H(
|
|
435
|
+
let r = $.getState().initParams, i = await H(x, {
|
|
433
436
|
id: t,
|
|
434
437
|
input: {
|
|
435
438
|
...n,
|
|
436
|
-
...n.type ? { type:
|
|
437
|
-
...n.status ? { status:
|
|
439
|
+
...n.type ? { type: P(n.type) } : {},
|
|
440
|
+
...n.status ? { status: P(n.status) } : {}
|
|
438
441
|
}
|
|
439
442
|
}, r, "Unable to update interview");
|
|
440
|
-
e((e) => ({ interviews: e.interviews.map((e) => e.id === t ?
|
|
443
|
+
e((e) => ({ interviews: e.interviews.map((e) => e.id === t ? I(i.updateCrewInterview, F.interview) : e) }));
|
|
441
444
|
},
|
|
442
445
|
removeInterview: async (t) => {
|
|
443
446
|
let n = $.getState().initParams;
|
|
444
|
-
await H(
|
|
447
|
+
await H(ee, { id: t }, n, "Unable to remove interview"), e((e) => ({ interviews: e.interviews.filter((e) => e.id !== t) }));
|
|
445
448
|
},
|
|
446
449
|
addVendor: async (t) => {
|
|
447
|
-
let n = $.getState().initParams, r = await H(
|
|
450
|
+
let n = $.getState().initParams, r = await H(te, { input: {
|
|
448
451
|
...t,
|
|
449
|
-
status:
|
|
452
|
+
status: P(t.status)
|
|
450
453
|
} }, n, "Unable to create vendor");
|
|
451
|
-
e((e) => ({ vendors: [
|
|
454
|
+
e((e) => ({ vendors: [I(r.createCrewVendor, F.vendor), ...e.vendors] }));
|
|
452
455
|
},
|
|
453
456
|
updateVendor: async (t, n) => {
|
|
454
|
-
let r = $.getState().initParams, i = await H(
|
|
457
|
+
let r = $.getState().initParams, i = await H(ne, {
|
|
455
458
|
id: t,
|
|
456
459
|
input: {
|
|
457
460
|
...n,
|
|
458
|
-
...n.status ? { status:
|
|
461
|
+
...n.status ? { status: P(n.status) } : {}
|
|
459
462
|
}
|
|
460
463
|
}, r, "Unable to update vendor");
|
|
461
|
-
e((e) => ({ vendors: e.vendors.map((e) => e.id === t ?
|
|
464
|
+
e((e) => ({ vendors: e.vendors.map((e) => e.id === t ? I(i.updateCrewVendor, F.vendor) : e) }));
|
|
462
465
|
},
|
|
463
466
|
removeVendor: async (t) => {
|
|
464
467
|
let n = $.getState().initParams;
|
|
465
|
-
await H(
|
|
468
|
+
await H(re, { id: t }, n, "Unable to remove vendor"), e((e) => ({ vendors: e.vendors.filter((e) => e.id !== t) }));
|
|
466
469
|
},
|
|
467
470
|
addClient: async (t) => {
|
|
468
|
-
let n = $.getState().initParams, r = await H(
|
|
471
|
+
let n = $.getState().initParams, r = await H(ie, { input: {
|
|
469
472
|
...t,
|
|
470
|
-
status:
|
|
473
|
+
status: P(t.status)
|
|
471
474
|
} }, n, "Unable to create client");
|
|
472
|
-
e((e) => ({ clients: [
|
|
475
|
+
e((e) => ({ clients: [I(r.createCrewClient, F.client), ...e.clients] }));
|
|
473
476
|
},
|
|
474
477
|
updateClient: async (t, n) => {
|
|
475
|
-
let r = $.getState().initParams, i = await H(
|
|
478
|
+
let r = $.getState().initParams, i = await H(ae, {
|
|
476
479
|
id: t,
|
|
477
480
|
input: {
|
|
478
481
|
...n,
|
|
479
|
-
...n.status ? { status:
|
|
482
|
+
...n.status ? { status: P(n.status) } : {}
|
|
480
483
|
}
|
|
481
484
|
}, r, "Unable to update client");
|
|
482
|
-
e((e) => ({ clients: e.clients.map((e) => e.id === t ?
|
|
485
|
+
e((e) => ({ clients: e.clients.map((e) => e.id === t ? I(i.updateCrewClient, F.client) : e) }));
|
|
483
486
|
},
|
|
484
487
|
removeClient: async (t) => {
|
|
485
488
|
let n = $.getState().initParams;
|
|
486
|
-
await H(
|
|
489
|
+
await H(oe, { id: t }, n, "Unable to remove client"), e((e) => ({ clients: e.clients.filter((e) => e.id !== t) }));
|
|
487
490
|
},
|
|
488
491
|
addTeam: async (t) => {
|
|
489
|
-
let n = $.getState().initParams, r = await H(
|
|
490
|
-
e((e) => ({ teams: [
|
|
492
|
+
let n = $.getState().initParams, r = await H(se, { input: t }, n, "Unable to create team");
|
|
493
|
+
e((e) => ({ teams: [I(r.createCrewTeam, F.team), ...e.teams] }));
|
|
491
494
|
},
|
|
492
495
|
updateTeam: async (t, n) => {
|
|
493
|
-
let r = $.getState().initParams, i = await H(
|
|
496
|
+
let r = $.getState().initParams, i = await H(ce, {
|
|
494
497
|
id: t,
|
|
495
498
|
input: n
|
|
496
499
|
}, r, "Unable to update team");
|
|
497
|
-
e((e) => ({ teams: e.teams.map((e) => e.id === t ?
|
|
500
|
+
e((e) => ({ teams: e.teams.map((e) => e.id === t ? I(i.updateCrewTeam, F.team) : e) }));
|
|
498
501
|
},
|
|
499
502
|
removeTeam: async (t) => {
|
|
500
503
|
let n = $.getState().initParams;
|
|
501
|
-
await H(
|
|
504
|
+
await H(le, { id: t }, n, "Unable to remove team"), e((e) => ({ teams: e.teams.filter((e) => e.id !== t) }));
|
|
502
505
|
},
|
|
503
506
|
addProject: async (t) => {
|
|
504
|
-
let n = $.getState().initParams, r = await H(
|
|
507
|
+
let n = $.getState().initParams, r = await H(ue, { input: {
|
|
505
508
|
...t,
|
|
506
|
-
status:
|
|
507
|
-
priority:
|
|
509
|
+
status: P(t.status),
|
|
510
|
+
priority: P(t.priority)
|
|
508
511
|
} }, n, "Unable to create project");
|
|
509
|
-
e((e) => ({ projects: [
|
|
512
|
+
e((e) => ({ projects: [I(r.createCrewProject, F.project), ...e.projects] }));
|
|
510
513
|
},
|
|
511
514
|
updateProject: async (t, n) => {
|
|
512
|
-
let r = $.getState().initParams, i = await H(
|
|
515
|
+
let r = $.getState().initParams, i = await H(de, {
|
|
513
516
|
id: t,
|
|
514
517
|
input: {
|
|
515
518
|
...n,
|
|
516
|
-
...n.status ? { status:
|
|
517
|
-
...n.priority ? { priority:
|
|
519
|
+
...n.status ? { status: P(n.status) } : {},
|
|
520
|
+
...n.priority ? { priority: P(n.priority) } : {}
|
|
518
521
|
}
|
|
519
522
|
}, r, "Unable to update project");
|
|
520
|
-
e((e) => ({ projects: e.projects.map((e) => e.id === t ?
|
|
523
|
+
e((e) => ({ projects: e.projects.map((e) => e.id === t ? I(i.updateCrewProject, F.project) : e) }));
|
|
521
524
|
},
|
|
522
525
|
removeProject: async (t) => {
|
|
523
526
|
let n = $.getState().initParams;
|
|
524
|
-
await H(
|
|
527
|
+
await H(fe, { id: t }, n, "Unable to remove project"), e((e) => ({ projects: e.projects.filter((e) => e.id !== t) }));
|
|
525
528
|
},
|
|
526
529
|
addDepartment: async (t) => {
|
|
527
|
-
let n = $.getState().initParams, r = await H(
|
|
528
|
-
e((e) => ({ departments: [
|
|
530
|
+
let n = $.getState().initParams, r = await H(pe, { input: t }, n, "Unable to create department");
|
|
531
|
+
e((e) => ({ departments: [I(r.createCrewDepartment, F.department), ...e.departments] }));
|
|
529
532
|
},
|
|
530
533
|
updateDepartment: async (t, n) => {
|
|
531
|
-
let r = $.getState().initParams, i = await H(
|
|
534
|
+
let r = $.getState().initParams, i = await H(me, {
|
|
532
535
|
id: t,
|
|
533
536
|
input: n
|
|
534
537
|
}, r, "Unable to update department");
|
|
535
|
-
e((e) => ({ departments: e.departments.map((e) => e.id === t ?
|
|
538
|
+
e((e) => ({ departments: e.departments.map((e) => e.id === t ? I(i.updateCrewDepartment, F.department) : e) }));
|
|
536
539
|
},
|
|
537
540
|
removeDepartment: async (t) => {
|
|
538
541
|
let n = $.getState().initParams;
|
|
539
|
-
await H(
|
|
542
|
+
await H(he, { id: t }, n, "Unable to remove department"), e((e) => ({ departments: e.departments.filter((e) => e.id !== t) }));
|
|
540
543
|
},
|
|
541
544
|
addPayrollRecord: async (t) => {
|
|
542
|
-
let n = $.getState().initParams, r = await H(
|
|
545
|
+
let n = $.getState().initParams, r = await H(ge, { input: {
|
|
543
546
|
...t,
|
|
544
|
-
status:
|
|
547
|
+
status: P(t.status)
|
|
545
548
|
} }, n, "Unable to create payroll record");
|
|
546
|
-
e((e) => ({ payrollRecords: [
|
|
549
|
+
e((e) => ({ payrollRecords: [I(r.createCrewPayrollRecord, F.payrollRecord), ...e.payrollRecords] }));
|
|
547
550
|
},
|
|
548
551
|
updatePayrollRecord: async (t, n) => {
|
|
549
|
-
let r = $.getState().initParams, i = await H(
|
|
552
|
+
let r = $.getState().initParams, i = await H(_e, {
|
|
550
553
|
id: t,
|
|
551
554
|
input: {
|
|
552
555
|
...n,
|
|
553
|
-
...n.status ? { status:
|
|
556
|
+
...n.status ? { status: P(n.status) } : {}
|
|
554
557
|
}
|
|
555
558
|
}, r, "Unable to update payroll record");
|
|
556
|
-
e((e) => ({ payrollRecords: e.payrollRecords.map((e) => e.id === t ?
|
|
559
|
+
e((e) => ({ payrollRecords: e.payrollRecords.map((e) => e.id === t ? I(i.updateCrewPayrollRecord, F.payrollRecord) : e) }));
|
|
557
560
|
},
|
|
558
561
|
removePayrollRecord: async (t) => {
|
|
559
562
|
let n = $.getState().initParams;
|
|
560
|
-
await H(
|
|
563
|
+
await H(ve, { id: t }, n, "Unable to remove payroll record"), e((e) => ({ payrollRecords: e.payrollRecords.filter((e) => e.id !== t) }));
|
|
561
564
|
},
|
|
562
565
|
addTimeEntry: async (t) => {
|
|
563
|
-
let n = $.getState().initParams, r = await H(
|
|
564
|
-
e((e) => ({ timeEntries: [
|
|
566
|
+
let n = $.getState().initParams, r = await H(Te, { input: t }, n, "Unable to create time entry");
|
|
567
|
+
e((e) => ({ timeEntries: [I(r.createCrewTimeEntry, F.timeEntry), ...e.timeEntries] }));
|
|
565
568
|
},
|
|
566
569
|
updateTimeEntry: async (t, n) => {
|
|
567
|
-
let r = $.getState().initParams, i = await H(
|
|
570
|
+
let r = $.getState().initParams, i = await H(Ee, {
|
|
568
571
|
id: t,
|
|
569
572
|
input: n
|
|
570
573
|
}, r, "Unable to update time entry");
|
|
571
|
-
e((e) => ({ timeEntries: e.timeEntries.map((e) => e.id === t ?
|
|
574
|
+
e((e) => ({ timeEntries: e.timeEntries.map((e) => e.id === t ? I(i.updateCrewTimeEntry, F.timeEntry) : e) }));
|
|
572
575
|
},
|
|
573
576
|
removeTimeEntry: async (t) => {
|
|
574
577
|
let n = $.getState().initParams;
|
|
575
|
-
await H(
|
|
578
|
+
await H(De, { id: t }, n, "Unable to remove time entry"), e((e) => ({ timeEntries: e.timeEntries.filter((e) => e.id !== t) }));
|
|
576
579
|
},
|
|
577
580
|
fetchJobPostingMatches: async (t) => {
|
|
578
581
|
let n = $.getState().initParams;
|
|
579
582
|
e({ jobPostingMatchesLoading: !0 });
|
|
580
583
|
try {
|
|
581
|
-
let r = (await H(
|
|
584
|
+
let r = (await H(C, { jobPostingId: t }, n, "Unable to load candidate matches")).crewJobPostingMatches.map((e) => ({
|
|
582
585
|
...e,
|
|
583
|
-
candidate:
|
|
586
|
+
candidate: I(e.candidate, F.candidate)
|
|
584
587
|
}));
|
|
585
588
|
e((e) => ({
|
|
586
589
|
jobPostingMatches: {
|
|
@@ -598,7 +601,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
598
601
|
e({ payrollRunsLoading: !0 });
|
|
599
602
|
try {
|
|
600
603
|
e({
|
|
601
|
-
payrollRuns: (await H(
|
|
604
|
+
payrollRuns: (await H(ye, void 0, t, "Unable to load payroll runs")).crewPayrollRuns,
|
|
602
605
|
payrollRunsLoaded: !0,
|
|
603
606
|
payrollRunsLoading: !1
|
|
604
607
|
});
|
|
@@ -607,23 +610,23 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
607
610
|
}
|
|
608
611
|
},
|
|
609
612
|
createPayrollRun: async (t) => {
|
|
610
|
-
let n = $.getState().initParams, r = await H(
|
|
613
|
+
let n = $.getState().initParams, r = await H(be, { input: t }, n, "Unable to create payroll run");
|
|
611
614
|
e((e) => ({ payrollRuns: [r.createCrewPayrollRun, ...e.payrollRuns] }));
|
|
612
615
|
},
|
|
613
616
|
calculatePayrollRun: async (t) => {
|
|
614
|
-
let n = $.getState().initParams, r = await H(
|
|
617
|
+
let n = $.getState().initParams, r = await H(xe, { id: t }, n, "Unable to calculate payroll run");
|
|
615
618
|
e((e) => ({
|
|
616
619
|
payrollRuns: e.payrollRuns.map((e) => e.id === t ? r.calculateCrewPayrollRun : e),
|
|
617
620
|
payslipsByRun: Object.fromEntries(Object.entries(e.payslipsByRun).filter(([e]) => e !== t))
|
|
618
621
|
}));
|
|
619
622
|
},
|
|
620
623
|
approvePayrollRun: async (t) => {
|
|
621
|
-
let n = $.getState().initParams, r = await H(
|
|
624
|
+
let n = $.getState().initParams, r = await H(Se, { id: t }, n, "Unable to approve payroll run");
|
|
622
625
|
e((e) => ({ payrollRuns: e.payrollRuns.map((e) => e.id === t ? r.approveCrewPayrollRun : e) }));
|
|
623
626
|
},
|
|
624
627
|
removePayrollRun: async (t) => {
|
|
625
628
|
let n = $.getState().initParams;
|
|
626
|
-
await H(
|
|
629
|
+
await H(Ce, { id: t }, n, "Unable to remove payroll run"), e((e) => ({
|
|
627
630
|
payrollRuns: e.payrollRuns.filter((e) => e.id !== t),
|
|
628
631
|
payslipsByRun: Object.fromEntries(Object.entries(e.payslipsByRun).filter(([e]) => e !== t))
|
|
629
632
|
}));
|
|
@@ -632,7 +635,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
632
635
|
let n = $.getState().initParams;
|
|
633
636
|
e({ payslipsLoading: !0 });
|
|
634
637
|
try {
|
|
635
|
-
let r = await H(
|
|
638
|
+
let r = await H(we, { filter: { payrollRunId: t } }, n, "Unable to load payslips");
|
|
636
639
|
e((e) => ({
|
|
637
640
|
payslipsByRun: {
|
|
638
641
|
...e.payslipsByRun,
|
|
@@ -645,11 +648,11 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
645
648
|
}
|
|
646
649
|
},
|
|
647
650
|
fetchEmployeeDocuments: async (t) => {
|
|
648
|
-
let n = $.getState().initParams, r = await H(
|
|
651
|
+
let n = $.getState().initParams, r = await H(T, { employeeId: t }, n, "Unable to load employee documents");
|
|
649
652
|
e((e) => ({ employeeDocuments: [...e.employeeDocuments.filter((e) => e.employeeId !== t), ...r.employeeDocuments] }));
|
|
650
653
|
},
|
|
651
654
|
uploadEmployeeDocument: async ({ employeeId: t, file: n, title: r, category: i }) => {
|
|
652
|
-
let a = $.getState().initParams, o = await H(
|
|
655
|
+
let a = $.getState().initParams, o = await H(Me, { 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(Ne, { input: {
|
|
653
656
|
fileName: n.name,
|
|
654
657
|
fileSize: String(n.size),
|
|
655
658
|
mimeType: n.type || "application/octet-stream",
|
|
@@ -664,9 +667,9 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
664
667
|
});
|
|
665
668
|
if (!e.ok) throw Error(`Failed to upload file bytes (status ${e.status})`);
|
|
666
669
|
}
|
|
667
|
-
let l = await H(
|
|
670
|
+
let l = await H(E, { input: {
|
|
668
671
|
employeeId: t,
|
|
669
|
-
fileId: (await H(
|
|
672
|
+
fileId: (await H(Pe, { input: {
|
|
670
673
|
sessionId: c.initiateUpload.session.id,
|
|
671
674
|
fileSize: String(n.size),
|
|
672
675
|
folderId: o.ensureFolderByPath.id
|
|
@@ -678,10 +681,10 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
678
681
|
},
|
|
679
682
|
detachEmployeeDocument: async (t) => {
|
|
680
683
|
let n = $.getState().initParams;
|
|
681
|
-
await H(
|
|
684
|
+
await H(Oe, { id: t }, n, "Unable to remove this document"), e((e) => ({ employeeDocuments: e.employeeDocuments.filter((e) => e.id !== t) }));
|
|
682
685
|
},
|
|
683
686
|
fetchEmployeeSkillProfile: async (t) => {
|
|
684
|
-
let n = $.getState().initParams, r = (await H(
|
|
687
|
+
let n = $.getState().initParams, r = (await H(ke, { id: t }, n, "Unable to load skills")).crewEmployee;
|
|
685
688
|
e((e) => ({
|
|
686
689
|
employeeSkillProfiles: {
|
|
687
690
|
...e.employeeSkillProfiles,
|
|
@@ -695,7 +698,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
695
698
|
},
|
|
696
699
|
attachEmployeeSkill: async ({ employeeId: e, skillName: t, proficiency: n }) => {
|
|
697
700
|
let r = $.getState().initParams;
|
|
698
|
-
await H(
|
|
701
|
+
await H(Ae, { input: {
|
|
699
702
|
employeeId: e,
|
|
700
703
|
skillName: t,
|
|
701
704
|
proficiency: n
|
|
@@ -703,7 +706,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
703
706
|
},
|
|
704
707
|
detachEmployeeSkill: async (e, t) => {
|
|
705
708
|
let n = $.getState().initParams;
|
|
706
|
-
await H(
|
|
709
|
+
await H(je, {
|
|
707
710
|
employeeId: e,
|
|
708
711
|
skillId: t
|
|
709
712
|
}, n, "Unable to remove this skill"), await $.getState().fetchEmployeeSkillProfile(e);
|
|
@@ -711,27 +714,27 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
711
714
|
fetchOnboardings: async () => {
|
|
712
715
|
let t = $.getState().initParams;
|
|
713
716
|
e({
|
|
714
|
-
onboardings: (await H(
|
|
717
|
+
onboardings: (await H(Fe, {}, t, "Unable to load onboarding")).crewOnboardings.map(L),
|
|
715
718
|
onboardingsLoaded: !0
|
|
716
719
|
});
|
|
717
720
|
},
|
|
718
721
|
createOnboarding: async (t) => {
|
|
719
|
-
let n = $.getState().initParams, r = await H(
|
|
720
|
-
e((e) => ({ onboardings: [
|
|
722
|
+
let n = $.getState().initParams, r = await H(Ie, { input: t }, n, "Unable to start onboarding");
|
|
723
|
+
e((e) => ({ onboardings: [L(r.createCrewOnboarding), ...e.onboardings] }));
|
|
721
724
|
},
|
|
722
725
|
updateOnboarding: async (t, n) => {
|
|
723
|
-
let r = $.getState().initParams, i = await H(
|
|
726
|
+
let r = $.getState().initParams, i = await H(Le, {
|
|
724
727
|
id: t,
|
|
725
728
|
input: n
|
|
726
729
|
}, r, "Unable to update onboarding");
|
|
727
|
-
e((e) => ({ onboardings: e.onboardings.map((e) => e.id === t ?
|
|
730
|
+
e((e) => ({ onboardings: e.onboardings.map((e) => e.id === t ? L(i.updateCrewOnboarding) : e) }));
|
|
728
731
|
},
|
|
729
732
|
removeOnboarding: async (t) => {
|
|
730
733
|
let n = $.getState().initParams;
|
|
731
|
-
await H(
|
|
734
|
+
await H(Re, { id: t }, n, "Unable to remove onboarding"), e((e) => ({ onboardings: e.onboardings.filter((e) => e.id !== t) }));
|
|
732
735
|
},
|
|
733
736
|
createOnboardingTask: async (t) => {
|
|
734
|
-
let n = $.getState().initParams, r =
|
|
737
|
+
let n = $.getState().initParams, r = I((await H(ze, { input: t }, n, "Unable to create onboarding task")).createCrewOnboardingTask, F.onboardingTask);
|
|
735
738
|
e((e) => ({ onboardings: e.onboardings.map((e) => e.id === r.onboardingId ? {
|
|
736
739
|
...e,
|
|
737
740
|
tasks: [...e.tasks, r],
|
|
@@ -739,10 +742,10 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
739
742
|
} : e) }));
|
|
740
743
|
},
|
|
741
744
|
updateOnboardingTask: async (t, n) => {
|
|
742
|
-
let r = $.getState().initParams, i =
|
|
745
|
+
let r = $.getState().initParams, i = I((await H(Be, {
|
|
743
746
|
id: t,
|
|
744
747
|
input: n
|
|
745
|
-
}, r, "Unable to update onboarding task")).updateCrewOnboardingTask,
|
|
748
|
+
}, r, "Unable to update onboarding task")).updateCrewOnboardingTask, F.onboardingTask);
|
|
746
749
|
e((e) => ({ onboardings: e.onboardings.map((e) => e.id === i.onboardingId ? {
|
|
747
750
|
...e,
|
|
748
751
|
tasks: e.tasks.map((e) => e.id === t ? i : e)
|
|
@@ -750,17 +753,17 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
750
753
|
},
|
|
751
754
|
removeOnboardingTask: async (t) => {
|
|
752
755
|
let n = $.getState().initParams;
|
|
753
|
-
await H(
|
|
756
|
+
await H(Ve, { id: t }, n, "Unable to remove onboarding task"), e((e) => ({ onboardings: e.onboardings.map((e) => e.tasks.some((e) => e.id === t) ? {
|
|
754
757
|
...e,
|
|
755
758
|
tasks: e.tasks.filter((e) => e.id !== t),
|
|
756
759
|
totalTaskCount: Math.max(0, e.totalTaskCount - 1)
|
|
757
760
|
} : e) }));
|
|
758
761
|
},
|
|
759
762
|
toggleOnboardingTask: async (t, n) => {
|
|
760
|
-
let r = $.getState().initParams, i =
|
|
763
|
+
let r = $.getState().initParams, i = I((await H(He, {
|
|
761
764
|
id: t,
|
|
762
765
|
completed: n
|
|
763
|
-
}, r, "Unable to update onboarding task")).toggleCrewOnboardingTask,
|
|
766
|
+
}, r, "Unable to update onboarding task")).toggleCrewOnboardingTask, F.onboardingTask);
|
|
764
767
|
e((e) => ({ onboardings: e.onboardings.map((e) => {
|
|
765
768
|
if (e.id !== i.onboardingId) return e;
|
|
766
769
|
let n = e.tasks.map((e) => e.id === t ? i : e), r = n.filter((e) => e.completedAt).length;
|
|
@@ -775,20 +778,20 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
775
778
|
fetchSkillsGap: async () => {
|
|
776
779
|
let t = $.getState().initParams;
|
|
777
780
|
e({
|
|
778
|
-
skillsGap: (await H(
|
|
781
|
+
skillsGap: (await H(w, void 0, t, "Unable to load skills coverage")).crewSkillsGap,
|
|
779
782
|
skillsGapLoaded: !0
|
|
780
783
|
});
|
|
781
784
|
},
|
|
782
785
|
fetchLearning: async () => {
|
|
783
786
|
let t = $.getState().initParams, n = {
|
|
784
|
-
limit:
|
|
787
|
+
limit: N,
|
|
785
788
|
offset: 0
|
|
786
789
|
};
|
|
787
790
|
for (let r = 1; r <= K; r += 1) {
|
|
788
|
-
let i = G.learning, a = await H(
|
|
791
|
+
let i = G.learning, a = await H(Ue, {
|
|
789
792
|
coursePage: n,
|
|
790
793
|
enrollmentPage: n
|
|
791
|
-
}, t, "Unable to load learning"), [o, s] = await Promise.all([W(
|
|
794
|
+
}, t, "Unable to load learning"), [o, s] = await Promise.all([W(We, "crewTrainingCourses", t, "Unable to load courses", a.crewTrainingCourses), W(Ge, "crewEnrollments", t, "Unable to load enrollments", a.crewEnrollments)]);
|
|
792
795
|
if (!(i !== G.learning && r < K)) {
|
|
793
796
|
e({
|
|
794
797
|
trainingCourses: o,
|
|
@@ -801,11 +804,11 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
801
804
|
}
|
|
802
805
|
},
|
|
803
806
|
createTrainingCourse: async (t) => {
|
|
804
|
-
let n = $.getState().initParams, r = (await H(
|
|
807
|
+
let n = $.getState().initParams, r = (await H(qe, { input: t }, n, "Unable to create course")).createCrewTrainingCourse;
|
|
805
808
|
return G.learning += 1, e((e) => ({ trainingCourses: [r, ...e.trainingCourses] })), r;
|
|
806
809
|
},
|
|
807
810
|
updateTrainingCourse: async (t, n) => {
|
|
808
|
-
let r = $.getState().initParams, i = await H(
|
|
811
|
+
let r = $.getState().initParams, i = await H(k, {
|
|
809
812
|
id: t,
|
|
810
813
|
input: n
|
|
811
814
|
}, r, "Unable to update course");
|
|
@@ -831,7 +834,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
831
834
|
updateEnrollmentStatus: async (t, n) => {
|
|
832
835
|
let r = $.getState().initParams, i = await H(Xe, {
|
|
833
836
|
id: t,
|
|
834
|
-
status:
|
|
837
|
+
status: P(n)
|
|
835
838
|
}, r, "Unable to update enrollment");
|
|
836
839
|
G.learning += 1, e((e) => ({ enrollments: Z(e.enrollments, q(i.updateCrewEnrollmentStatus)) }));
|
|
837
840
|
let a = await Q(r);
|
|
@@ -866,7 +869,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
866
869
|
id: t,
|
|
867
870
|
input: n.status ? {
|
|
868
871
|
...n,
|
|
869
|
-
status:
|
|
872
|
+
status: P(n.status)
|
|
870
873
|
} : n
|
|
871
874
|
}, r, "Unable to update service");
|
|
872
875
|
G.marketplace += 1, e((e) => ({ serviceListings: Z(e.serviceListings, J(i.updateMyServiceListing)) }));
|
|
@@ -885,7 +888,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
885
888
|
updateBookingStatus: async (t, n) => {
|
|
886
889
|
let r = $.getState().initParams, i = await H(at, {
|
|
887
890
|
id: t,
|
|
888
|
-
status:
|
|
891
|
+
status: P(n)
|
|
889
892
|
}, r, "Unable to update booking");
|
|
890
893
|
G.marketplace += 1, e((e) => ({
|
|
891
894
|
bookings: Z(e.bookings, Y(i.updateMyBookingStatus)),
|
|
@@ -918,6 +921,6 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
918
921
|
}
|
|
919
922
|
}));
|
|
920
923
|
//#endregion
|
|
921
|
-
export {
|
|
924
|
+
export { V as CONVERSATIONS_ROUTE, $ as useCrewFoundryStore };
|
|
922
925
|
|
|
923
926
|
//# sourceMappingURL=crewfoundryStore.js.map
|