@burdenoff/microfe-crewfoundry 2026.1030.2 → 2026.1030.4
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.
- package/dist/crewfoundry/CrewFoundryRoutes.d.ts.map +1 -1
- package/dist/crewfoundry/CrewFoundryRoutes.js +18 -14
- package/dist/crewfoundry/CrewFoundryRoutes.js.map +1 -1
- package/dist/crewfoundry/components/EmployeeSkillsPanel.d.ts +9 -0
- package/dist/crewfoundry/components/EmployeeSkillsPanel.d.ts.map +1 -1
- package/dist/crewfoundry/components/EmployeeSkillsPanel.js +111 -77
- package/dist/crewfoundry/components/EmployeeSkillsPanel.js.map +1 -1
- package/dist/crewfoundry/components/skills/FindPeopleBySkillCard.d.ts +13 -0
- package/dist/crewfoundry/components/skills/FindPeopleBySkillCard.d.ts.map +1 -0
- package/dist/crewfoundry/components/skills/FindPeopleBySkillCard.js +128 -0
- package/dist/crewfoundry/components/skills/FindPeopleBySkillCard.js.map +1 -0
- package/dist/crewfoundry/components/skills/MergeSkillDialog.d.ts +15 -0
- package/dist/crewfoundry/components/skills/MergeSkillDialog.d.ts.map +1 -0
- package/dist/crewfoundry/components/skills/MergeSkillDialog.js +58 -0
- package/dist/crewfoundry/components/skills/MergeSkillDialog.js.map +1 -0
- package/dist/crewfoundry/components/skills/RoleSkillMatchPanel.d.ts +15 -0
- package/dist/crewfoundry/components/skills/RoleSkillMatchPanel.d.ts.map +1 -0
- package/dist/crewfoundry/components/skills/RoleSkillMatchPanel.js +163 -0
- package/dist/crewfoundry/components/skills/RoleSkillMatchPanel.js.map +1 -0
- package/dist/crewfoundry/components/skills/SkillPicker.d.ts +20 -0
- package/dist/crewfoundry/components/skills/SkillPicker.d.ts.map +1 -0
- package/dist/crewfoundry/components/skills/SkillPicker.js +73 -0
- package/dist/crewfoundry/components/skills/SkillPicker.js.map +1 -0
- package/dist/crewfoundry/components/skills/SkillRelationsDialog.d.ts +13 -0
- package/dist/crewfoundry/components/skills/SkillRelationsDialog.d.ts.map +1 -0
- package/dist/crewfoundry/components/skills/SkillRelationsDialog.js +156 -0
- package/dist/crewfoundry/components/skills/SkillRelationsDialog.js.map +1 -0
- package/dist/crewfoundry/lib/analytics.d.ts +1 -29
- package/dist/crewfoundry/lib/analytics.d.ts.map +1 -1
- package/dist/crewfoundry/lib/analytics.js +3 -48
- package/dist/crewfoundry/lib/analytics.js.map +1 -1
- package/dist/crewfoundry/lib/skillMatching.d.ts +70 -0
- package/dist/crewfoundry/lib/skillMatching.d.ts.map +1 -0
- package/dist/crewfoundry/lib/skillMatching.js +73 -0
- package/dist/crewfoundry/lib/skillMatching.js.map +1 -0
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +210 -177
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js +6 -6
- package/dist/crewfoundry/pages/HrSkillsTaxonomyPagePage.d.ts +9 -0
- package/dist/crewfoundry/pages/HrSkillsTaxonomyPagePage.d.ts.map +1 -0
- package/dist/crewfoundry/pages/HrSkillsTaxonomyPagePage.js +456 -0
- package/dist/crewfoundry/pages/HrSkillsTaxonomyPagePage.js.map +1 -0
- package/dist/crewfoundry/pages/ProjectsResourcingPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/ProjectsResourcingPagePage.js +50 -102
- package/dist/crewfoundry/pages/ProjectsResourcingPagePage.js.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.d.ts +101 -0
- package/dist/crewfoundry/store/crewfoundryStore.d.ts.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.js +292 -185
- package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
- package/package.json +1 -1
|
@@ -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) }", Oe = "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 } }", ke = "mutation DetachEmployeeDocument($id: ID!) { detachEmployeeDocument(id: $id) }", Ae = "query CrewEmployeeSkillProfile($id: ID!) { crewEmployee(id: $id) { id skills skillProfile { id skillId proficiency verifiedFrom lastUsedAt skill { id name category source } } } }", je = "mutation AttachCrewSkill($input: AttachCrewSkillInput!) { attachCrewSkill(input: $input) { id } }", Me = "mutation DetachCrewSkill($employeeId: ID!, $skillId: ID!) { detachCrewSkill(employeeId: $employeeId, skillId: $skillId) }", E = 100, Ne = 50, Pe = "query CrewSkillsTaxonomy($pagination: PaginationInput) { crewSkills(pagination: $pagination) { id name slug category source description aliases employeeCount candidateCount relations { id type fromSkillId toSkillId } } }", Fe = "query CrewSkillCategories { crewSkillCategories }", Ie = "mutation CreateCrewSkill($input: CreateCrewSkillInput!) { createCrewSkill(input: $input) { id } }", Le = "mutation UpdateCrewSkill($id: ID!, $input: UpdateCrewSkillInput!) { updateCrewSkill(id: $id, input: $input) { id } }", Re = "mutation MergeCrewSkills($sourceId: ID!, $targetId: ID!) { mergeCrewSkills(sourceId: $sourceId, targetId: $targetId) { target { id name } employeesMoved candidatesMoved jobPostingsMoved } }", ze = "mutation RemoveCrewSkill($id: ID!) { removeCrewSkill(id: $id) }", Be = "mutation CreateCrewSkillRelation($input: CreateCrewSkillRelationInput!) { createCrewSkillRelation(input: $input) { id } }", Ve = "mutation RemoveCrewSkillRelation($id: ID!) { removeCrewSkillRelation(id: $id) }", He = "query CrewEmployeesBySkill($skillId: ID!, $minProficiency: Int, $limit: Int) { crewEmployeesBySkill(skillId: $skillId, minProficiency: $minProficiency, limit: $limit) { employee { id firstName lastName position department } matchType matchedSkill { id name } proficiency verifiedFrom explanation } }", Ue = "query CrewJobPostingSkillRequirements($id: ID!) { crewJobPosting(id: $id) { id skillRequirements { id skillId required minProficiency skill { id name category source } } } }", We = "query CrewCandidateSkillProfile($id: ID!) { crewCandidate(id: $id) { id skills skillProfile { id skillId proficiency source skill { id name category source } } } }", Ge = "mutation AttachCrewCandidateSkill($input: AttachCrewCandidateSkillInput!) { attachCrewCandidateSkill(input: $input) { id } }", Ke = "mutation DetachCrewCandidateSkill($candidateId: ID!, $skillId: ID!) { detachCrewCandidateSkill(candidateId: $candidateId, skillId: $skillId) }", qe = "mutation EnsureFolderByPath($path: String!) { ensureFolderByPath(path: $path) { id } }", Je = "mutation InitiateUpload($input: InitiateUploadInput!) { initiateUpload(input: $input) { session { id } uploadUrl } }", Ye = "mutation CompleteUpload($input: CompleteUploadInput!) { completeUpload(input: $input) { file { id } } }", Xe = "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 } } }", Ze = "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 } } }", Qe = "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 } } }", $e = "mutation RemoveCrewOnboarding($id: ID!) { removeCrewOnboarding(id: $id) }", et = "mutation CreateCrewOnboardingTask($input: CreateCrewOnboardingTaskInput!) { createCrewOnboardingTask(input: $input) { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } }", tt = "mutation UpdateCrewOnboardingTask($id: ID!, $input: UpdateCrewOnboardingTaskInput!) { updateCrewOnboardingTask(id: $id, input: $input) { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } }", nt = "mutation RemoveCrewOnboardingTask($id: ID!) { removeCrewOnboardingTask(id: $id) }", rt = "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", it = `query CrewLearning($coursePage: PaginationInput, $enrollmentPage: PaginationInput) { crewTrainingCourses(pagination: $coursePage) { ${D} } crewEnrollments(pagination: $enrollmentPage) { ${O} } crewTrainingCompletionDashboard { courseId courseTitle totalEnrolled notStartedCount inProgressCount completedCount completionRate } }`, at = `query CrewTrainingCourses($pagination: PaginationInput) { crewTrainingCourses(pagination: $pagination) { ${D} } }`, ot = `query CrewEnrollments($pagination: PaginationInput) { crewEnrollments(pagination: $pagination) { ${O} } }`, st = "query CrewTrainingCompletionDashboard { crewTrainingCompletionDashboard { courseId courseTitle totalEnrolled notStartedCount inProgressCount completedCount completionRate } }", ct = `mutation CreateCrewTrainingCourse($input: CreateCrewTrainingCourseInput!) { createCrewTrainingCourse(input: $input) { ${D} } }`, lt = `mutation UpdateCrewTrainingCourse($id: ID!, $input: UpdateCrewTrainingCourseInput!) { updateCrewTrainingCourse(id: $id, input: $input) { ${D} } }`, k = "mutation RemoveCrewTrainingCourse($id: ID!) { removeCrewTrainingCourse(id: $id) }", ut = `mutation CreateCrewEnrollment($input: CreateCrewEnrollmentInput!) { createCrewEnrollment(input: $input) { ${O} } }`, dt = `mutation UpdateCrewEnrollmentStatus($id: ID!, $status: String!) { updateCrewEnrollmentStatus(id: $id, status: $status) { ${O} } }`, ft = "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", pt = `query CrewServiceListings($pagination: PaginationInput) { crewServiceListings(pagination: $pagination) { ${A} } }`, mt = `query CrewBookings($pagination: PaginationInput) { crewBookings(pagination: $pagination) { ${j} } }`, ht = `query CrewEscrowRecords($pagination: PaginationInput) { crewEscrowRecords(pagination: $pagination) { ${M} } }`, gt = `mutation CreateCrewServiceListing($input: CreateCrewServiceListingInput!) { createCrewServiceListing(input: $input) { ${A} } }`, _t = `mutation UpdateMyServiceListing($id: ID!, $input: UpdateCrewServiceListingInput!) { updateMyServiceListing(id: $id, input: $input) { ${A} } }`, vt = "mutation RemoveMyServiceListing($id: ID!) { removeMyServiceListing(id: $id) }", yt = `mutation CreateCrewBooking($input: CreateCrewBookingInput!) { createCrewBooking(input: $input) { ${j} } }`, bt = `mutation UpdateMyBookingStatus($id: ID!, $status: String!) { updateMyBookingStatus(id: $id, status: $status) { ${j} } }`, xt = `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", wt = (e) => !e || typeof e != "object" || Array.isArray(e) ? null : e, z = (e) => typeof e == "number" ? e : null, B = (e) => typeof e == "string" ? e : null, Tt = (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
|
+
}, Et = (e) => {
|
|
44
44
|
let t = e.toLowerCase();
|
|
45
45
|
return t === "active" ? "active" : t === "inactive" || t === "archived" || t === "deleted" ? "disbanded" : "forming";
|
|
46
|
-
},
|
|
47
|
-
let r =
|
|
46
|
+
}, Dt = (e, t) => e.map((e, n) => {
|
|
47
|
+
let r = wt(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:
|
|
52
|
-
status:
|
|
53
|
-
priority:
|
|
54
|
-
startDate:
|
|
55
|
-
endDate:
|
|
51
|
+
description: B(r?.description) || `${e.key} delivery plan`,
|
|
52
|
+
status: Tt(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
|
-
}),
|
|
66
|
+
}), Ot = (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:
|
|
75
|
+
status: Et(e.status),
|
|
76
76
|
projectCount: 0,
|
|
77
|
-
createdAt:
|
|
78
|
-
})),
|
|
77
|
+
createdAt: R(e.createdAt)
|
|
78
|
+
})), V = "/conversations", kt = (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
|
+
})), At = (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
|
+
}, jt = 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
|
+
]), Mt = (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)) jt.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
|
+
}, Nt = (e) => /^\s*mutation\b/.test(e), H = async (e, r, i, a, o = "workspace") => {
|
|
124
|
+
let s = At(await n({
|
|
125
|
+
gateway: o,
|
|
126
|
+
query: e,
|
|
127
|
+
variables: Mt(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 Nt(e) && t(), s;
|
|
133
|
+
}, Pt = () => !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 Pt() && 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 <
|
|
139
|
-
for (let o = +!!i; o <
|
|
141
|
+
if (i && i.length < N) return a;
|
|
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(st, void 0, e, "Unable to load training completion"))?.crewTrainingCompletionDashboard ?? null, $ = e((e) => ({
|
|
151
154
|
metrics: [
|
|
152
155
|
{
|
|
153
156
|
label: "Total Employees",
|
|
@@ -221,6 +224,10 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
221
224
|
clients: [],
|
|
222
225
|
employeeDocuments: [],
|
|
223
226
|
employeeSkillProfiles: {},
|
|
227
|
+
skillsTaxonomy: [],
|
|
228
|
+
skillsTaxonomyLoaded: !1,
|
|
229
|
+
skillCategories: [],
|
|
230
|
+
candidateSkillProfiles: {},
|
|
224
231
|
onboardings: [],
|
|
225
232
|
onboardingsLoaded: !1,
|
|
226
233
|
jobPostingMatches: {},
|
|
@@ -250,7 +257,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
250
257
|
initParams: t
|
|
251
258
|
});
|
|
252
259
|
try {
|
|
253
|
-
let [
|
|
260
|
+
let [n, o] = await Promise.all([U(a, {
|
|
254
261
|
workspaceId: t.workspaceId,
|
|
255
262
|
projectPagination: {
|
|
256
263
|
limit: 50,
|
|
@@ -258,7 +265,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
258
265
|
},
|
|
259
266
|
groupFirst: 30,
|
|
260
267
|
conversationFirst: 30
|
|
261
|
-
}, t, "Unable to load workspace bootstrap with overlap data"), U(
|
|
268
|
+
}, 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 ? Ot(n.groups.edges) : [], l = n ? Dt(n.projects.items, c) : [], u = n ? kt(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
269
|
e({
|
|
263
270
|
employees: m,
|
|
264
271
|
departments: h,
|
|
@@ -268,12 +275,12 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
268
275
|
announcements: y,
|
|
269
276
|
teams: b,
|
|
270
277
|
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) =>
|
|
278
|
+
payrollRecords: (o?.crewPayrollRecords ?? []).map((e) => I(e, F.payrollRecord)),
|
|
279
|
+
leaveRequests: s.leaveRequests.map((e) => I(e, F.leaveRequest)),
|
|
280
|
+
timeEntries: s.timeEntries.map((e) => I(e, F.timeEntry)),
|
|
281
|
+
notifications: p.map((e) => I(e, F.notification)),
|
|
282
|
+
vendors: s.vendors.map((e) => I(e, F.vendor)),
|
|
283
|
+
clients: s.clients.map((e) => I(e, F.client)),
|
|
277
284
|
metrics: [
|
|
278
285
|
{
|
|
279
286
|
label: "Total Employees",
|
|
@@ -310,84 +317,84 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
310
317
|
setSelectedView: (t) => e({ selectedView: t }),
|
|
311
318
|
setWorkItems: (t) => e({ workItems: t }),
|
|
312
319
|
addEmployee: async (t) => {
|
|
313
|
-
let n = $.getState().initParams, r = await H(
|
|
320
|
+
let n = $.getState().initParams, r = await H(o, { input: {
|
|
314
321
|
...t,
|
|
315
|
-
status:
|
|
316
|
-
type:
|
|
322
|
+
status: P(t.status),
|
|
323
|
+
type: P(t.type)
|
|
317
324
|
} }, n, "Unable to create employee");
|
|
318
|
-
e((e) => ({ employees: [
|
|
325
|
+
e((e) => ({ employees: [I(r.createCrewEmployee, F.employee), ...e.employees] }));
|
|
319
326
|
},
|
|
320
327
|
updateEmployee: async (t, n) => {
|
|
321
|
-
let r = $.getState().initParams, i = await H(
|
|
328
|
+
let r = $.getState().initParams, i = await H(s, {
|
|
322
329
|
id: t,
|
|
323
330
|
input: {
|
|
324
331
|
...n,
|
|
325
|
-
...n.status ? { status:
|
|
326
|
-
...n.type ? { type:
|
|
332
|
+
...n.status ? { status: P(n.status) } : {},
|
|
333
|
+
...n.type ? { type: P(n.type) } : {}
|
|
327
334
|
}
|
|
328
335
|
}, r, "Unable to update employee");
|
|
329
|
-
e((e) => ({ employees: e.employees.map((e) => e.id === t ?
|
|
336
|
+
e((e) => ({ employees: e.employees.map((e) => e.id === t ? I(i.updateCrewEmployee, F.employee) : e) }));
|
|
330
337
|
},
|
|
331
338
|
removeEmployee: async (t) => {
|
|
332
339
|
let n = $.getState().initParams;
|
|
333
|
-
await H(
|
|
340
|
+
await H(c, { id: t }, n, "Unable to remove employee"), e((e) => ({ employees: e.employees.filter((e) => e.id !== t) }));
|
|
334
341
|
},
|
|
335
342
|
addJobPosting: async (t) => {
|
|
336
|
-
let n = $.getState().initParams, r = await H(
|
|
343
|
+
let n = $.getState().initParams, r = await H(l, { input: {
|
|
337
344
|
...t,
|
|
338
|
-
status:
|
|
345
|
+
status: P(t.status)
|
|
339
346
|
} }, n, "Unable to create job posting");
|
|
340
|
-
e((e) => ({ jobPostings: [
|
|
347
|
+
e((e) => ({ jobPostings: [I(r.createCrewJobPosting, F.jobPosting), ...e.jobPostings] }));
|
|
341
348
|
},
|
|
342
349
|
updateJobPosting: async (t, n) => {
|
|
343
|
-
let r = $.getState().initParams, i = await H(
|
|
350
|
+
let r = $.getState().initParams, i = await H(u, {
|
|
344
351
|
id: t,
|
|
345
352
|
input: {
|
|
346
353
|
...n,
|
|
347
|
-
...n.status ? { status:
|
|
354
|
+
...n.status ? { status: P(n.status) } : {}
|
|
348
355
|
}
|
|
349
356
|
}, r, "Unable to update job posting");
|
|
350
|
-
e((e) => ({ jobPostings: e.jobPostings.map((e) => e.id === t ?
|
|
357
|
+
e((e) => ({ jobPostings: e.jobPostings.map((e) => e.id === t ? I(i.updateCrewJobPosting, F.jobPosting) : e) }));
|
|
351
358
|
},
|
|
352
359
|
addCandidate: async (t) => {
|
|
353
|
-
let n = $.getState().initParams, r = await H(
|
|
360
|
+
let n = $.getState().initParams, r = await H(d, { input: {
|
|
354
361
|
...t,
|
|
355
|
-
status:
|
|
362
|
+
status: P(t.status)
|
|
356
363
|
} }, n, "Unable to create candidate");
|
|
357
|
-
e((e) => ({ candidates: [
|
|
364
|
+
e((e) => ({ candidates: [I(r.createCrewCandidate, F.candidate), ...e.candidates] }));
|
|
358
365
|
},
|
|
359
366
|
updateCandidate: async (t, n) => {
|
|
360
|
-
let r = $.getState().initParams, i = await H(
|
|
367
|
+
let r = $.getState().initParams, i = await H(f, {
|
|
361
368
|
id: t,
|
|
362
369
|
input: {
|
|
363
370
|
...n,
|
|
364
|
-
...n.status ? { status:
|
|
371
|
+
...n.status ? { status: P(n.status) } : {}
|
|
365
372
|
}
|
|
366
373
|
}, r, "Unable to update candidate");
|
|
367
|
-
e((e) => ({ candidates: e.candidates.map((e) => e.id === t ?
|
|
374
|
+
e((e) => ({ candidates: e.candidates.map((e) => e.id === t ? I(i.updateCrewCandidate, F.candidate) : e) }));
|
|
368
375
|
},
|
|
369
376
|
addAnnouncement: async (t) => {
|
|
370
|
-
let n = $.getState().initParams, r = await H(
|
|
371
|
-
e((e) => ({ announcements: [
|
|
377
|
+
let n = $.getState().initParams, r = await H(p, { input: t }, n, "Unable to create announcement");
|
|
378
|
+
e((e) => ({ announcements: [I(r.createCrewAnnouncement, F.announcement), ...e.announcements] }));
|
|
372
379
|
},
|
|
373
380
|
addLeaveRequest: async (t) => {
|
|
374
|
-
let n = $.getState().initParams, r = await H(
|
|
381
|
+
let n = $.getState().initParams, r = await H(m, { input: {
|
|
375
382
|
...t,
|
|
376
|
-
type:
|
|
377
|
-
status:
|
|
383
|
+
type: P(t.type),
|
|
384
|
+
status: P(t.status)
|
|
378
385
|
} }, n, "Unable to create leave request");
|
|
379
|
-
e((e) => ({ leaveRequests: [
|
|
386
|
+
e((e) => ({ leaveRequests: [I(r.createCrewLeaveRequest, F.leaveRequest), ...e.leaveRequests] }));
|
|
380
387
|
},
|
|
381
388
|
updateLeaveRequest: async (t, n) => {
|
|
382
|
-
let r = $.getState().initParams, i = await H(
|
|
389
|
+
let r = $.getState().initParams, i = await H(h, {
|
|
383
390
|
id: t,
|
|
384
391
|
input: {
|
|
385
392
|
...n,
|
|
386
|
-
...n.type ? { type:
|
|
387
|
-
...n.status ? { status:
|
|
393
|
+
...n.type ? { type: P(n.type) } : {},
|
|
394
|
+
...n.status ? { status: P(n.status) } : {}
|
|
388
395
|
}
|
|
389
396
|
}, r, "Unable to update leave request");
|
|
390
|
-
e((e) => ({ leaveRequests: e.leaveRequests.map((e) => e.id === t ?
|
|
397
|
+
e((e) => ({ leaveRequests: e.leaveRequests.map((e) => e.id === t ? I(i.updateCrewLeaveRequest, F.leaveRequest) : e) }));
|
|
391
398
|
},
|
|
392
399
|
markNotificationRead: async (t) => {
|
|
393
400
|
e((e) => ({ notifications: e.notifications.map((e) => e.id === t ? {
|
|
@@ -403,184 +410,184 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
403
410
|
},
|
|
404
411
|
removeJobPosting: async (t) => {
|
|
405
412
|
let n = $.getState().initParams;
|
|
406
|
-
await H(
|
|
413
|
+
await H(g, { id: t }, n, "Unable to remove job posting"), e((e) => ({ jobPostings: e.jobPostings.filter((e) => e.id !== t) }));
|
|
407
414
|
},
|
|
408
415
|
removeCandidate: async (t) => {
|
|
409
416
|
let n = $.getState().initParams;
|
|
410
|
-
await H(
|
|
417
|
+
await H(_, { id: t }, n, "Unable to remove candidate"), e((e) => ({ candidates: e.candidates.filter((e) => e.id !== t) }));
|
|
411
418
|
},
|
|
412
419
|
updateAnnouncement: async (t, n) => {
|
|
413
|
-
let r = $.getState().initParams, i = await H(
|
|
420
|
+
let r = $.getState().initParams, i = await H(v, {
|
|
414
421
|
id: t,
|
|
415
422
|
input: n
|
|
416
423
|
}, r, "Unable to update announcement");
|
|
417
|
-
e((e) => ({ announcements: e.announcements.map((e) => e.id === t ?
|
|
424
|
+
e((e) => ({ announcements: e.announcements.map((e) => e.id === t ? I(i.updateCrewAnnouncement, F.announcement) : e) }));
|
|
418
425
|
},
|
|
419
426
|
removeAnnouncement: async (t) => {
|
|
420
427
|
let n = $.getState().initParams;
|
|
421
|
-
await H(
|
|
428
|
+
await H(y, { id: t }, n, "Unable to remove announcement"), e((e) => ({ announcements: e.announcements.filter((e) => e.id !== t) }));
|
|
422
429
|
},
|
|
423
430
|
addInterview: async (t) => {
|
|
424
|
-
let n = $.getState().initParams, r = await H(
|
|
431
|
+
let n = $.getState().initParams, r = await H(b, { input: {
|
|
425
432
|
...t,
|
|
426
|
-
type:
|
|
427
|
-
status:
|
|
433
|
+
type: P(t.type),
|
|
434
|
+
status: P(t.status)
|
|
428
435
|
} }, n, "Unable to schedule interview");
|
|
429
|
-
e((e) => ({ interviews: [
|
|
436
|
+
e((e) => ({ interviews: [I(r.createCrewInterview, F.interview), ...e.interviews] }));
|
|
430
437
|
},
|
|
431
438
|
updateInterview: async (t, n) => {
|
|
432
|
-
let r = $.getState().initParams, i = await H(
|
|
439
|
+
let r = $.getState().initParams, i = await H(x, {
|
|
433
440
|
id: t,
|
|
434
441
|
input: {
|
|
435
442
|
...n,
|
|
436
|
-
...n.type ? { type:
|
|
437
|
-
...n.status ? { status:
|
|
443
|
+
...n.type ? { type: P(n.type) } : {},
|
|
444
|
+
...n.status ? { status: P(n.status) } : {}
|
|
438
445
|
}
|
|
439
446
|
}, r, "Unable to update interview");
|
|
440
|
-
e((e) => ({ interviews: e.interviews.map((e) => e.id === t ?
|
|
447
|
+
e((e) => ({ interviews: e.interviews.map((e) => e.id === t ? I(i.updateCrewInterview, F.interview) : e) }));
|
|
441
448
|
},
|
|
442
449
|
removeInterview: async (t) => {
|
|
443
450
|
let n = $.getState().initParams;
|
|
444
|
-
await H(
|
|
451
|
+
await H(ee, { id: t }, n, "Unable to remove interview"), e((e) => ({ interviews: e.interviews.filter((e) => e.id !== t) }));
|
|
445
452
|
},
|
|
446
453
|
addVendor: async (t) => {
|
|
447
|
-
let n = $.getState().initParams, r = await H(
|
|
454
|
+
let n = $.getState().initParams, r = await H(te, { input: {
|
|
448
455
|
...t,
|
|
449
|
-
status:
|
|
456
|
+
status: P(t.status)
|
|
450
457
|
} }, n, "Unable to create vendor");
|
|
451
|
-
e((e) => ({ vendors: [
|
|
458
|
+
e((e) => ({ vendors: [I(r.createCrewVendor, F.vendor), ...e.vendors] }));
|
|
452
459
|
},
|
|
453
460
|
updateVendor: async (t, n) => {
|
|
454
|
-
let r = $.getState().initParams, i = await H(
|
|
461
|
+
let r = $.getState().initParams, i = await H(ne, {
|
|
455
462
|
id: t,
|
|
456
463
|
input: {
|
|
457
464
|
...n,
|
|
458
|
-
...n.status ? { status:
|
|
465
|
+
...n.status ? { status: P(n.status) } : {}
|
|
459
466
|
}
|
|
460
467
|
}, r, "Unable to update vendor");
|
|
461
|
-
e((e) => ({ vendors: e.vendors.map((e) => e.id === t ?
|
|
468
|
+
e((e) => ({ vendors: e.vendors.map((e) => e.id === t ? I(i.updateCrewVendor, F.vendor) : e) }));
|
|
462
469
|
},
|
|
463
470
|
removeVendor: async (t) => {
|
|
464
471
|
let n = $.getState().initParams;
|
|
465
|
-
await H(
|
|
472
|
+
await H(re, { id: t }, n, "Unable to remove vendor"), e((e) => ({ vendors: e.vendors.filter((e) => e.id !== t) }));
|
|
466
473
|
},
|
|
467
474
|
addClient: async (t) => {
|
|
468
|
-
let n = $.getState().initParams, r = await H(
|
|
475
|
+
let n = $.getState().initParams, r = await H(ie, { input: {
|
|
469
476
|
...t,
|
|
470
|
-
status:
|
|
477
|
+
status: P(t.status)
|
|
471
478
|
} }, n, "Unable to create client");
|
|
472
|
-
e((e) => ({ clients: [
|
|
479
|
+
e((e) => ({ clients: [I(r.createCrewClient, F.client), ...e.clients] }));
|
|
473
480
|
},
|
|
474
481
|
updateClient: async (t, n) => {
|
|
475
|
-
let r = $.getState().initParams, i = await H(
|
|
482
|
+
let r = $.getState().initParams, i = await H(ae, {
|
|
476
483
|
id: t,
|
|
477
484
|
input: {
|
|
478
485
|
...n,
|
|
479
|
-
...n.status ? { status:
|
|
486
|
+
...n.status ? { status: P(n.status) } : {}
|
|
480
487
|
}
|
|
481
488
|
}, r, "Unable to update client");
|
|
482
|
-
e((e) => ({ clients: e.clients.map((e) => e.id === t ?
|
|
489
|
+
e((e) => ({ clients: e.clients.map((e) => e.id === t ? I(i.updateCrewClient, F.client) : e) }));
|
|
483
490
|
},
|
|
484
491
|
removeClient: async (t) => {
|
|
485
492
|
let n = $.getState().initParams;
|
|
486
|
-
await H(
|
|
493
|
+
await H(oe, { id: t }, n, "Unable to remove client"), e((e) => ({ clients: e.clients.filter((e) => e.id !== t) }));
|
|
487
494
|
},
|
|
488
495
|
addTeam: async (t) => {
|
|
489
|
-
let n = $.getState().initParams, r = await H(
|
|
490
|
-
e((e) => ({ teams: [
|
|
496
|
+
let n = $.getState().initParams, r = await H(se, { input: t }, n, "Unable to create team");
|
|
497
|
+
e((e) => ({ teams: [I(r.createCrewTeam, F.team), ...e.teams] }));
|
|
491
498
|
},
|
|
492
499
|
updateTeam: async (t, n) => {
|
|
493
|
-
let r = $.getState().initParams, i = await H(
|
|
500
|
+
let r = $.getState().initParams, i = await H(ce, {
|
|
494
501
|
id: t,
|
|
495
502
|
input: n
|
|
496
503
|
}, r, "Unable to update team");
|
|
497
|
-
e((e) => ({ teams: e.teams.map((e) => e.id === t ?
|
|
504
|
+
e((e) => ({ teams: e.teams.map((e) => e.id === t ? I(i.updateCrewTeam, F.team) : e) }));
|
|
498
505
|
},
|
|
499
506
|
removeTeam: async (t) => {
|
|
500
507
|
let n = $.getState().initParams;
|
|
501
|
-
await H(
|
|
508
|
+
await H(le, { id: t }, n, "Unable to remove team"), e((e) => ({ teams: e.teams.filter((e) => e.id !== t) }));
|
|
502
509
|
},
|
|
503
510
|
addProject: async (t) => {
|
|
504
|
-
let n = $.getState().initParams, r = await H(
|
|
511
|
+
let n = $.getState().initParams, r = await H(ue, { input: {
|
|
505
512
|
...t,
|
|
506
|
-
status:
|
|
507
|
-
priority:
|
|
513
|
+
status: P(t.status),
|
|
514
|
+
priority: P(t.priority)
|
|
508
515
|
} }, n, "Unable to create project");
|
|
509
|
-
e((e) => ({ projects: [
|
|
516
|
+
e((e) => ({ projects: [I(r.createCrewProject, F.project), ...e.projects] }));
|
|
510
517
|
},
|
|
511
518
|
updateProject: async (t, n) => {
|
|
512
|
-
let r = $.getState().initParams, i = await H(
|
|
519
|
+
let r = $.getState().initParams, i = await H(de, {
|
|
513
520
|
id: t,
|
|
514
521
|
input: {
|
|
515
522
|
...n,
|
|
516
|
-
...n.status ? { status:
|
|
517
|
-
...n.priority ? { priority:
|
|
523
|
+
...n.status ? { status: P(n.status) } : {},
|
|
524
|
+
...n.priority ? { priority: P(n.priority) } : {}
|
|
518
525
|
}
|
|
519
526
|
}, r, "Unable to update project");
|
|
520
|
-
e((e) => ({ projects: e.projects.map((e) => e.id === t ?
|
|
527
|
+
e((e) => ({ projects: e.projects.map((e) => e.id === t ? I(i.updateCrewProject, F.project) : e) }));
|
|
521
528
|
},
|
|
522
529
|
removeProject: async (t) => {
|
|
523
530
|
let n = $.getState().initParams;
|
|
524
|
-
await H(
|
|
531
|
+
await H(fe, { id: t }, n, "Unable to remove project"), e((e) => ({ projects: e.projects.filter((e) => e.id !== t) }));
|
|
525
532
|
},
|
|
526
533
|
addDepartment: async (t) => {
|
|
527
|
-
let n = $.getState().initParams, r = await H(
|
|
528
|
-
e((e) => ({ departments: [
|
|
534
|
+
let n = $.getState().initParams, r = await H(pe, { input: t }, n, "Unable to create department");
|
|
535
|
+
e((e) => ({ departments: [I(r.createCrewDepartment, F.department), ...e.departments] }));
|
|
529
536
|
},
|
|
530
537
|
updateDepartment: async (t, n) => {
|
|
531
|
-
let r = $.getState().initParams, i = await H(
|
|
538
|
+
let r = $.getState().initParams, i = await H(me, {
|
|
532
539
|
id: t,
|
|
533
540
|
input: n
|
|
534
541
|
}, r, "Unable to update department");
|
|
535
|
-
e((e) => ({ departments: e.departments.map((e) => e.id === t ?
|
|
542
|
+
e((e) => ({ departments: e.departments.map((e) => e.id === t ? I(i.updateCrewDepartment, F.department) : e) }));
|
|
536
543
|
},
|
|
537
544
|
removeDepartment: async (t) => {
|
|
538
545
|
let n = $.getState().initParams;
|
|
539
|
-
await H(
|
|
546
|
+
await H(he, { id: t }, n, "Unable to remove department"), e((e) => ({ departments: e.departments.filter((e) => e.id !== t) }));
|
|
540
547
|
},
|
|
541
548
|
addPayrollRecord: async (t) => {
|
|
542
|
-
let n = $.getState().initParams, r = await H(
|
|
549
|
+
let n = $.getState().initParams, r = await H(ge, { input: {
|
|
543
550
|
...t,
|
|
544
|
-
status:
|
|
551
|
+
status: P(t.status)
|
|
545
552
|
} }, n, "Unable to create payroll record");
|
|
546
|
-
e((e) => ({ payrollRecords: [
|
|
553
|
+
e((e) => ({ payrollRecords: [I(r.createCrewPayrollRecord, F.payrollRecord), ...e.payrollRecords] }));
|
|
547
554
|
},
|
|
548
555
|
updatePayrollRecord: async (t, n) => {
|
|
549
|
-
let r = $.getState().initParams, i = await H(
|
|
556
|
+
let r = $.getState().initParams, i = await H(_e, {
|
|
550
557
|
id: t,
|
|
551
558
|
input: {
|
|
552
559
|
...n,
|
|
553
|
-
...n.status ? { status:
|
|
560
|
+
...n.status ? { status: P(n.status) } : {}
|
|
554
561
|
}
|
|
555
562
|
}, r, "Unable to update payroll record");
|
|
556
|
-
e((e) => ({ payrollRecords: e.payrollRecords.map((e) => e.id === t ?
|
|
563
|
+
e((e) => ({ payrollRecords: e.payrollRecords.map((e) => e.id === t ? I(i.updateCrewPayrollRecord, F.payrollRecord) : e) }));
|
|
557
564
|
},
|
|
558
565
|
removePayrollRecord: async (t) => {
|
|
559
566
|
let n = $.getState().initParams;
|
|
560
|
-
await H(
|
|
567
|
+
await H(ve, { id: t }, n, "Unable to remove payroll record"), e((e) => ({ payrollRecords: e.payrollRecords.filter((e) => e.id !== t) }));
|
|
561
568
|
},
|
|
562
569
|
addTimeEntry: async (t) => {
|
|
563
|
-
let n = $.getState().initParams, r = await H(
|
|
564
|
-
e((e) => ({ timeEntries: [
|
|
570
|
+
let n = $.getState().initParams, r = await H(Te, { input: t }, n, "Unable to create time entry");
|
|
571
|
+
e((e) => ({ timeEntries: [I(r.createCrewTimeEntry, F.timeEntry), ...e.timeEntries] }));
|
|
565
572
|
},
|
|
566
573
|
updateTimeEntry: async (t, n) => {
|
|
567
|
-
let r = $.getState().initParams, i = await H(
|
|
574
|
+
let r = $.getState().initParams, i = await H(Ee, {
|
|
568
575
|
id: t,
|
|
569
576
|
input: n
|
|
570
577
|
}, r, "Unable to update time entry");
|
|
571
|
-
e((e) => ({ timeEntries: e.timeEntries.map((e) => e.id === t ?
|
|
578
|
+
e((e) => ({ timeEntries: e.timeEntries.map((e) => e.id === t ? I(i.updateCrewTimeEntry, F.timeEntry) : e) }));
|
|
572
579
|
},
|
|
573
580
|
removeTimeEntry: async (t) => {
|
|
574
581
|
let n = $.getState().initParams;
|
|
575
|
-
await H(
|
|
582
|
+
await H(De, { id: t }, n, "Unable to remove time entry"), e((e) => ({ timeEntries: e.timeEntries.filter((e) => e.id !== t) }));
|
|
576
583
|
},
|
|
577
584
|
fetchJobPostingMatches: async (t) => {
|
|
578
585
|
let n = $.getState().initParams;
|
|
579
586
|
e({ jobPostingMatchesLoading: !0 });
|
|
580
587
|
try {
|
|
581
|
-
let r = (await H(
|
|
588
|
+
let r = (await H(Oe, { jobPostingId: t }, n, "Unable to load candidate matches")).crewJobPostingMatches.map((e) => ({
|
|
582
589
|
...e,
|
|
583
|
-
candidate:
|
|
590
|
+
candidate: I(e.candidate, F.candidate)
|
|
584
591
|
}));
|
|
585
592
|
e((e) => ({
|
|
586
593
|
jobPostingMatches: {
|
|
@@ -598,7 +605,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
598
605
|
e({ payrollRunsLoading: !0 });
|
|
599
606
|
try {
|
|
600
607
|
e({
|
|
601
|
-
payrollRuns: (await H(
|
|
608
|
+
payrollRuns: (await H(ye, void 0, t, "Unable to load payroll runs")).crewPayrollRuns,
|
|
602
609
|
payrollRunsLoaded: !0,
|
|
603
610
|
payrollRunsLoading: !1
|
|
604
611
|
});
|
|
@@ -607,23 +614,23 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
607
614
|
}
|
|
608
615
|
},
|
|
609
616
|
createPayrollRun: async (t) => {
|
|
610
|
-
let n = $.getState().initParams, r = await H(
|
|
617
|
+
let n = $.getState().initParams, r = await H(be, { input: t }, n, "Unable to create payroll run");
|
|
611
618
|
e((e) => ({ payrollRuns: [r.createCrewPayrollRun, ...e.payrollRuns] }));
|
|
612
619
|
},
|
|
613
620
|
calculatePayrollRun: async (t) => {
|
|
614
|
-
let n = $.getState().initParams, r = await H(
|
|
621
|
+
let n = $.getState().initParams, r = await H(xe, { id: t }, n, "Unable to calculate payroll run");
|
|
615
622
|
e((e) => ({
|
|
616
623
|
payrollRuns: e.payrollRuns.map((e) => e.id === t ? r.calculateCrewPayrollRun : e),
|
|
617
624
|
payslipsByRun: Object.fromEntries(Object.entries(e.payslipsByRun).filter(([e]) => e !== t))
|
|
618
625
|
}));
|
|
619
626
|
},
|
|
620
627
|
approvePayrollRun: async (t) => {
|
|
621
|
-
let n = $.getState().initParams, r = await H(
|
|
628
|
+
let n = $.getState().initParams, r = await H(Se, { id: t }, n, "Unable to approve payroll run");
|
|
622
629
|
e((e) => ({ payrollRuns: e.payrollRuns.map((e) => e.id === t ? r.approveCrewPayrollRun : e) }));
|
|
623
630
|
},
|
|
624
631
|
removePayrollRun: async (t) => {
|
|
625
632
|
let n = $.getState().initParams;
|
|
626
|
-
await H(
|
|
633
|
+
await H(Ce, { id: t }, n, "Unable to remove payroll run"), e((e) => ({
|
|
627
634
|
payrollRuns: e.payrollRuns.filter((e) => e.id !== t),
|
|
628
635
|
payslipsByRun: Object.fromEntries(Object.entries(e.payslipsByRun).filter(([e]) => e !== t))
|
|
629
636
|
}));
|
|
@@ -632,7 +639,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
632
639
|
let n = $.getState().initParams;
|
|
633
640
|
e({ payslipsLoading: !0 });
|
|
634
641
|
try {
|
|
635
|
-
let r = await H(
|
|
642
|
+
let r = await H(we, { filter: { payrollRunId: t } }, n, "Unable to load payslips");
|
|
636
643
|
e((e) => ({
|
|
637
644
|
payslipsByRun: {
|
|
638
645
|
...e.payslipsByRun,
|
|
@@ -649,7 +656,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
649
656
|
e((e) => ({ employeeDocuments: [...e.employeeDocuments.filter((e) => e.employeeId !== t), ...r.employeeDocuments] }));
|
|
650
657
|
},
|
|
651
658
|
uploadEmployeeDocument: async ({ employeeId: t, file: n, title: r, category: i }) => {
|
|
652
|
-
let a = $.getState().initParams, o = await H(
|
|
659
|
+
let a = $.getState().initParams, o = await H(qe, { 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(Je, { input: {
|
|
653
660
|
fileName: n.name,
|
|
654
661
|
fileSize: String(n.size),
|
|
655
662
|
mimeType: n.type || "application/octet-stream",
|
|
@@ -666,7 +673,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
666
673
|
}
|
|
667
674
|
let l = await H(T, { input: {
|
|
668
675
|
employeeId: t,
|
|
669
|
-
fileId: (await H(
|
|
676
|
+
fileId: (await H(Ye, { input: {
|
|
670
677
|
sessionId: c.initiateUpload.session.id,
|
|
671
678
|
fileSize: String(n.size),
|
|
672
679
|
folderId: o.ensureFolderByPath.id
|
|
@@ -678,10 +685,10 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
678
685
|
},
|
|
679
686
|
detachEmployeeDocument: async (t) => {
|
|
680
687
|
let n = $.getState().initParams;
|
|
681
|
-
await H(
|
|
688
|
+
await H(ke, { id: t }, n, "Unable to remove this document"), e((e) => ({ employeeDocuments: e.employeeDocuments.filter((e) => e.id !== t) }));
|
|
682
689
|
},
|
|
683
690
|
fetchEmployeeSkillProfile: async (t) => {
|
|
684
|
-
let n = $.getState().initParams, r = (await H(
|
|
691
|
+
let n = $.getState().initParams, r = (await H(Ae, { id: t }, n, "Unable to load skills")).crewEmployee;
|
|
685
692
|
e((e) => ({
|
|
686
693
|
employeeSkillProfiles: {
|
|
687
694
|
...e.employeeSkillProfiles,
|
|
@@ -695,7 +702,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
695
702
|
},
|
|
696
703
|
attachEmployeeSkill: async ({ employeeId: e, skillName: t, proficiency: n }) => {
|
|
697
704
|
let r = $.getState().initParams;
|
|
698
|
-
await H(
|
|
705
|
+
await H(je, { input: {
|
|
699
706
|
employeeId: e,
|
|
700
707
|
skillName: t,
|
|
701
708
|
proficiency: n
|
|
@@ -703,35 +710,135 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
703
710
|
},
|
|
704
711
|
detachEmployeeSkill: async (e, t) => {
|
|
705
712
|
let n = $.getState().initParams;
|
|
706
|
-
await H(
|
|
713
|
+
await H(Me, {
|
|
707
714
|
employeeId: e,
|
|
708
715
|
skillId: t
|
|
709
716
|
}, n, "Unable to remove this skill"), await $.getState().fetchEmployeeSkillProfile(e);
|
|
710
717
|
},
|
|
718
|
+
fetchSkillsTaxonomy: async () => {
|
|
719
|
+
let t = $.getState().initParams, [n, r] = await Promise.all([(async () => {
|
|
720
|
+
let e = [];
|
|
721
|
+
for (let n = 0; n < Ne; n += 1) {
|
|
722
|
+
let r = await H(Pe, { pagination: {
|
|
723
|
+
limit: E,
|
|
724
|
+
offset: n * E
|
|
725
|
+
} }, t, "Unable to load the skills taxonomy");
|
|
726
|
+
if (e.push(...r.crewSkills), r.crewSkills.length < E) break;
|
|
727
|
+
}
|
|
728
|
+
return e;
|
|
729
|
+
})(), H(Fe, void 0, t, "Unable to load skill categories")]);
|
|
730
|
+
e({
|
|
731
|
+
skillsTaxonomy: n,
|
|
732
|
+
skillsTaxonomyLoaded: !0,
|
|
733
|
+
skillCategories: r.crewSkillCategories
|
|
734
|
+
});
|
|
735
|
+
},
|
|
736
|
+
createTaxonomySkill: async ({ name: e, category: t, aliases: n, description: r }) => {
|
|
737
|
+
let i = $.getState().initParams;
|
|
738
|
+
await H(Ie, { input: {
|
|
739
|
+
name: e,
|
|
740
|
+
category: t,
|
|
741
|
+
aliases: n,
|
|
742
|
+
...r ? { description: r } : {}
|
|
743
|
+
} }, i, "Unable to create this skill"), await $.getState().fetchSkillsTaxonomy();
|
|
744
|
+
},
|
|
745
|
+
updateTaxonomySkill: async (e, t) => {
|
|
746
|
+
let n = $.getState().initParams;
|
|
747
|
+
await H(Le, {
|
|
748
|
+
id: e,
|
|
749
|
+
input: t
|
|
750
|
+
}, n, "Unable to update this skill"), await $.getState().fetchSkillsTaxonomy();
|
|
751
|
+
},
|
|
752
|
+
mergeTaxonomySkills: async (e, t) => {
|
|
753
|
+
let n = $.getState().initParams, r = await H(Re, {
|
|
754
|
+
sourceId: e,
|
|
755
|
+
targetId: t
|
|
756
|
+
}, n, "Unable to merge these skills");
|
|
757
|
+
await $.getState().fetchSkillsTaxonomy();
|
|
758
|
+
let i = r.mergeCrewSkills;
|
|
759
|
+
return {
|
|
760
|
+
targetName: i.target.name,
|
|
761
|
+
employeesMoved: i.employeesMoved,
|
|
762
|
+
candidatesMoved: i.candidatesMoved,
|
|
763
|
+
jobPostingsMoved: i.jobPostingsMoved
|
|
764
|
+
};
|
|
765
|
+
},
|
|
766
|
+
removeTaxonomySkill: async (e) => {
|
|
767
|
+
let t = $.getState().initParams;
|
|
768
|
+
await H(ze, { id: e }, t, "Unable to remove this skill"), await $.getState().fetchSkillsTaxonomy();
|
|
769
|
+
},
|
|
770
|
+
createSkillRelation: async (e) => {
|
|
771
|
+
let t = $.getState().initParams;
|
|
772
|
+
await H(Be, { input: e }, t, "Unable to add this relation"), await $.getState().fetchSkillsTaxonomy();
|
|
773
|
+
},
|
|
774
|
+
removeSkillRelation: async (e) => {
|
|
775
|
+
let t = $.getState().initParams;
|
|
776
|
+
await H(Ve, { id: e }, t, "Unable to remove this relation"), await $.getState().fetchSkillsTaxonomy();
|
|
777
|
+
},
|
|
778
|
+
fetchEmployeesBySkill: async (e, t) => {
|
|
779
|
+
let n = $.getState().initParams;
|
|
780
|
+
return (await H(He, {
|
|
781
|
+
skillId: e,
|
|
782
|
+
minProficiency: t?.minProficiency ?? null,
|
|
783
|
+
limit: t?.limit ?? 50
|
|
784
|
+
}, n, "Unable to find people with this skill")).crewEmployeesBySkill;
|
|
785
|
+
},
|
|
786
|
+
fetchJobPostingSkillRequirements: async (e) => {
|
|
787
|
+
let t = $.getState().initParams;
|
|
788
|
+
return (await H(Ue, { id: e }, t, "Unable to load the skills this role needs")).crewJobPosting?.skillRequirements ?? [];
|
|
789
|
+
},
|
|
790
|
+
fetchCandidateSkillProfile: async (t) => {
|
|
791
|
+
let n = $.getState().initParams, r = (await H(We, { id: t }, n, "Unable to load skills")).crewCandidate;
|
|
792
|
+
e((e) => ({
|
|
793
|
+
candidateSkillProfiles: {
|
|
794
|
+
...e.candidateSkillProfiles,
|
|
795
|
+
[t]: r?.skillProfile ?? []
|
|
796
|
+
},
|
|
797
|
+
candidates: r ? e.candidates.map((e) => e.id === t ? {
|
|
798
|
+
...e,
|
|
799
|
+
skills: r.skills
|
|
800
|
+
} : e) : e.candidates
|
|
801
|
+
}));
|
|
802
|
+
},
|
|
803
|
+
attachCandidateSkill: async ({ candidateId: e, skillName: t, proficiency: n }) => {
|
|
804
|
+
let r = $.getState().initParams;
|
|
805
|
+
await H(Ge, { input: {
|
|
806
|
+
candidateId: e,
|
|
807
|
+
skillName: t,
|
|
808
|
+
proficiency: n
|
|
809
|
+
} }, r, "Unable to add this skill"), await $.getState().fetchCandidateSkillProfile(e);
|
|
810
|
+
},
|
|
811
|
+
detachCandidateSkill: async (e, t) => {
|
|
812
|
+
let n = $.getState().initParams;
|
|
813
|
+
await H(Ke, {
|
|
814
|
+
candidateId: e,
|
|
815
|
+
skillId: t
|
|
816
|
+
}, n, "Unable to remove this skill"), await $.getState().fetchCandidateSkillProfile(e);
|
|
817
|
+
},
|
|
711
818
|
fetchOnboardings: async () => {
|
|
712
819
|
let t = $.getState().initParams;
|
|
713
820
|
e({
|
|
714
|
-
onboardings: (await H(
|
|
821
|
+
onboardings: (await H(Xe, {}, t, "Unable to load onboarding")).crewOnboardings.map(L),
|
|
715
822
|
onboardingsLoaded: !0
|
|
716
823
|
});
|
|
717
824
|
},
|
|
718
825
|
createOnboarding: async (t) => {
|
|
719
|
-
let n = $.getState().initParams, r = await H(
|
|
720
|
-
e((e) => ({ onboardings: [
|
|
826
|
+
let n = $.getState().initParams, r = await H(Ze, { input: t }, n, "Unable to start onboarding");
|
|
827
|
+
e((e) => ({ onboardings: [L(r.createCrewOnboarding), ...e.onboardings] }));
|
|
721
828
|
},
|
|
722
829
|
updateOnboarding: async (t, n) => {
|
|
723
|
-
let r = $.getState().initParams, i = await H(
|
|
830
|
+
let r = $.getState().initParams, i = await H(Qe, {
|
|
724
831
|
id: t,
|
|
725
832
|
input: n
|
|
726
833
|
}, r, "Unable to update onboarding");
|
|
727
|
-
e((e) => ({ onboardings: e.onboardings.map((e) => e.id === t ?
|
|
834
|
+
e((e) => ({ onboardings: e.onboardings.map((e) => e.id === t ? L(i.updateCrewOnboarding) : e) }));
|
|
728
835
|
},
|
|
729
836
|
removeOnboarding: async (t) => {
|
|
730
837
|
let n = $.getState().initParams;
|
|
731
|
-
await H(
|
|
838
|
+
await H($e, { id: t }, n, "Unable to remove onboarding"), e((e) => ({ onboardings: e.onboardings.filter((e) => e.id !== t) }));
|
|
732
839
|
},
|
|
733
840
|
createOnboardingTask: async (t) => {
|
|
734
|
-
let n = $.getState().initParams, r =
|
|
841
|
+
let n = $.getState().initParams, r = I((await H(et, { input: t }, n, "Unable to create onboarding task")).createCrewOnboardingTask, F.onboardingTask);
|
|
735
842
|
e((e) => ({ onboardings: e.onboardings.map((e) => e.id === r.onboardingId ? {
|
|
736
843
|
...e,
|
|
737
844
|
tasks: [...e.tasks, r],
|
|
@@ -739,10 +846,10 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
739
846
|
} : e) }));
|
|
740
847
|
},
|
|
741
848
|
updateOnboardingTask: async (t, n) => {
|
|
742
|
-
let r = $.getState().initParams, i =
|
|
849
|
+
let r = $.getState().initParams, i = I((await H(tt, {
|
|
743
850
|
id: t,
|
|
744
851
|
input: n
|
|
745
|
-
}, r, "Unable to update onboarding task")).updateCrewOnboardingTask,
|
|
852
|
+
}, r, "Unable to update onboarding task")).updateCrewOnboardingTask, F.onboardingTask);
|
|
746
853
|
e((e) => ({ onboardings: e.onboardings.map((e) => e.id === i.onboardingId ? {
|
|
747
854
|
...e,
|
|
748
855
|
tasks: e.tasks.map((e) => e.id === t ? i : e)
|
|
@@ -750,17 +857,17 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
750
857
|
},
|
|
751
858
|
removeOnboardingTask: async (t) => {
|
|
752
859
|
let n = $.getState().initParams;
|
|
753
|
-
await H(
|
|
860
|
+
await H(nt, { id: t }, n, "Unable to remove onboarding task"), e((e) => ({ onboardings: e.onboardings.map((e) => e.tasks.some((e) => e.id === t) ? {
|
|
754
861
|
...e,
|
|
755
862
|
tasks: e.tasks.filter((e) => e.id !== t),
|
|
756
863
|
totalTaskCount: Math.max(0, e.totalTaskCount - 1)
|
|
757
864
|
} : e) }));
|
|
758
865
|
},
|
|
759
866
|
toggleOnboardingTask: async (t, n) => {
|
|
760
|
-
let r = $.getState().initParams, i =
|
|
867
|
+
let r = $.getState().initParams, i = I((await H(rt, {
|
|
761
868
|
id: t,
|
|
762
869
|
completed: n
|
|
763
|
-
}, r, "Unable to update onboarding task")).toggleCrewOnboardingTask,
|
|
870
|
+
}, r, "Unable to update onboarding task")).toggleCrewOnboardingTask, F.onboardingTask);
|
|
764
871
|
e((e) => ({ onboardings: e.onboardings.map((e) => {
|
|
765
872
|
if (e.id !== i.onboardingId) return e;
|
|
766
873
|
let n = e.tasks.map((e) => e.id === t ? i : e), r = n.filter((e) => e.completedAt).length;
|
|
@@ -781,14 +888,14 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
781
888
|
},
|
|
782
889
|
fetchLearning: async () => {
|
|
783
890
|
let t = $.getState().initParams, n = {
|
|
784
|
-
limit:
|
|
891
|
+
limit: N,
|
|
785
892
|
offset: 0
|
|
786
893
|
};
|
|
787
894
|
for (let r = 1; r <= K; r += 1) {
|
|
788
|
-
let i = G.learning, a = await H(
|
|
895
|
+
let i = G.learning, a = await H(it, {
|
|
789
896
|
coursePage: n,
|
|
790
897
|
enrollmentPage: n
|
|
791
|
-
}, t, "Unable to load learning"), [o, s] = await Promise.all([W(
|
|
898
|
+
}, t, "Unable to load learning"), [o, s] = await Promise.all([W(at, "crewTrainingCourses", t, "Unable to load courses", a.crewTrainingCourses), W(ot, "crewEnrollments", t, "Unable to load enrollments", a.crewEnrollments)]);
|
|
792
899
|
if (!(i !== G.learning && r < K)) {
|
|
793
900
|
e({
|
|
794
901
|
trainingCourses: o,
|
|
@@ -801,11 +908,11 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
801
908
|
}
|
|
802
909
|
},
|
|
803
910
|
createTrainingCourse: async (t) => {
|
|
804
|
-
let n = $.getState().initParams, r = (await H(
|
|
911
|
+
let n = $.getState().initParams, r = (await H(ct, { input: t }, n, "Unable to create course")).createCrewTrainingCourse;
|
|
805
912
|
return G.learning += 1, e((e) => ({ trainingCourses: [r, ...e.trainingCourses] })), r;
|
|
806
913
|
},
|
|
807
914
|
updateTrainingCourse: async (t, n) => {
|
|
808
|
-
let r = $.getState().initParams, i = await H(
|
|
915
|
+
let r = $.getState().initParams, i = await H(lt, {
|
|
809
916
|
id: t,
|
|
810
917
|
input: n
|
|
811
918
|
}, r, "Unable to update course");
|
|
@@ -813,13 +920,13 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
813
920
|
},
|
|
814
921
|
removeTrainingCourse: async (t) => {
|
|
815
922
|
let n = $.getState().initParams;
|
|
816
|
-
await H(
|
|
923
|
+
await H(k, { id: t }, n, "Unable to remove course"), G.learning += 1, e((e) => ({
|
|
817
924
|
trainingCourses: e.trainingCourses.filter((e) => e.id !== t),
|
|
818
925
|
trainingCompletion: e.trainingCompletion.filter((e) => e.courseId !== t)
|
|
819
926
|
}));
|
|
820
927
|
},
|
|
821
928
|
enrollEmployee: async (t, n) => {
|
|
822
|
-
let r = $.getState().initParams, i = q((await H(
|
|
929
|
+
let r = $.getState().initParams, i = q((await H(ut, { input: {
|
|
823
930
|
courseId: t,
|
|
824
931
|
employeeId: n.id,
|
|
825
932
|
employeeName: `${n.firstName} ${n.lastName}`.trim()
|
|
@@ -829,9 +936,9 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
829
936
|
a && e({ trainingCompletion: a });
|
|
830
937
|
},
|
|
831
938
|
updateEnrollmentStatus: async (t, n) => {
|
|
832
|
-
let r = $.getState().initParams, i = await H(
|
|
939
|
+
let r = $.getState().initParams, i = await H(dt, {
|
|
833
940
|
id: t,
|
|
834
|
-
status:
|
|
941
|
+
status: P(n)
|
|
835
942
|
}, r, "Unable to update enrollment");
|
|
836
943
|
G.learning += 1, e((e) => ({ enrollments: Z(e.enrollments, q(i.updateCrewEnrollmentStatus)) }));
|
|
837
944
|
let a = await Q(r);
|
|
@@ -839,14 +946,14 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
839
946
|
},
|
|
840
947
|
removeEnrollment: async (t) => {
|
|
841
948
|
let n = $.getState().initParams;
|
|
842
|
-
await H(
|
|
949
|
+
await H(ft, { id: t }, n, "Unable to remove enrollment"), G.learning += 1, e((e) => ({ enrollments: e.enrollments.filter((e) => e.id !== t) }));
|
|
843
950
|
let r = await Q(n);
|
|
844
951
|
r && e({ trainingCompletion: r });
|
|
845
952
|
},
|
|
846
953
|
fetchMarketplace: async () => {
|
|
847
954
|
let t = $.getState().initParams;
|
|
848
955
|
for (let n = 1; n <= K; n += 1) {
|
|
849
|
-
let r = G.marketplace, [i, a] = await Promise.all([W(
|
|
956
|
+
let r = G.marketplace, [i, a] = await Promise.all([W(pt, "crewServiceListings", t, "Unable to load marketplace services"), W(mt, "crewBookings", t, "Unable to load bookings")]);
|
|
850
957
|
if (!(r !== G.marketplace && n < K)) {
|
|
851
958
|
e({
|
|
852
959
|
serviceListings: i.map(J),
|
|
@@ -858,34 +965,34 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
858
965
|
}
|
|
859
966
|
},
|
|
860
967
|
createServiceListing: async (t) => {
|
|
861
|
-
let n = $.getState().initParams, r = J((await H(
|
|
968
|
+
let n = $.getState().initParams, r = J((await H(gt, { input: t }, n, "Unable to publish service")).createCrewServiceListing);
|
|
862
969
|
return G.marketplace += 1, e((e) => ({ serviceListings: [r, ...e.serviceListings] })), r;
|
|
863
970
|
},
|
|
864
971
|
updateServiceListing: async (t, n) => {
|
|
865
|
-
let r = $.getState().initParams, i = await H(
|
|
972
|
+
let r = $.getState().initParams, i = await H(_t, {
|
|
866
973
|
id: t,
|
|
867
974
|
input: n.status ? {
|
|
868
975
|
...n,
|
|
869
|
-
status:
|
|
976
|
+
status: P(n.status)
|
|
870
977
|
} : n
|
|
871
978
|
}, r, "Unable to update service");
|
|
872
979
|
G.marketplace += 1, e((e) => ({ serviceListings: Z(e.serviceListings, J(i.updateMyServiceListing)) }));
|
|
873
980
|
},
|
|
874
981
|
removeServiceListing: async (t) => {
|
|
875
982
|
let n = $.getState().initParams;
|
|
876
|
-
await H(
|
|
983
|
+
await H(vt, { id: t }, n, "Unable to remove service"), G.marketplace += 1, e((e) => ({ serviceListings: e.serviceListings.filter((e) => e.id !== t) }));
|
|
877
984
|
},
|
|
878
985
|
bookServiceListing: async (t) => {
|
|
879
|
-
let n = $.getState().initParams, r = Y((await H(
|
|
986
|
+
let n = $.getState().initParams, r = Y((await H(yt, { input: t }, n, "Unable to book service")).createCrewBooking);
|
|
880
987
|
return G.marketplace += 1, e((e) => ({
|
|
881
988
|
bookings: [r, ...e.bookings],
|
|
882
989
|
escrowLoaded: !1
|
|
883
990
|
})), r;
|
|
884
991
|
},
|
|
885
992
|
updateBookingStatus: async (t, n) => {
|
|
886
|
-
let r = $.getState().initParams, i = await H(
|
|
993
|
+
let r = $.getState().initParams, i = await H(bt, {
|
|
887
994
|
id: t,
|
|
888
|
-
status:
|
|
995
|
+
status: P(n)
|
|
889
996
|
}, r, "Unable to update booking");
|
|
890
997
|
G.marketplace += 1, e((e) => ({
|
|
891
998
|
bookings: Z(e.bookings, Y(i.updateMyBookingStatus)),
|
|
@@ -896,7 +1003,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
896
1003
|
let t = $.getState().initParams;
|
|
897
1004
|
try {
|
|
898
1005
|
e({
|
|
899
|
-
escrowRecords: (await W(
|
|
1006
|
+
escrowRecords: (await W(ht, "crewEscrowRecords", t, "Unable to load escrow records")).map(X),
|
|
900
1007
|
escrowLoaded: !0,
|
|
901
1008
|
escrowError: null
|
|
902
1009
|
});
|
|
@@ -909,15 +1016,15 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
909
1016
|
}
|
|
910
1017
|
},
|
|
911
1018
|
releaseEscrowRecord: async (t) => {
|
|
912
|
-
let n = $.getState().initParams, r = await H(
|
|
1019
|
+
let n = $.getState().initParams, r = await H(xt, { id: t }, n, "Unable to release escrow");
|
|
913
1020
|
e((e) => ({ escrowRecords: Z(e.escrowRecords, X(r.releaseCrewEscrowRecord)) }));
|
|
914
1021
|
},
|
|
915
1022
|
cancelEscrowRecord: async (t) => {
|
|
916
|
-
let n = $.getState().initParams, r = await H(
|
|
1023
|
+
let n = $.getState().initParams, r = await H(St, { id: t }, n, "Unable to cancel escrow");
|
|
917
1024
|
e((e) => ({ escrowRecords: Z(e.escrowRecords, X(r.cancelCrewEscrowRecord)) }));
|
|
918
1025
|
}
|
|
919
1026
|
}));
|
|
920
1027
|
//#endregion
|
|
921
|
-
export {
|
|
1028
|
+
export { V as CONVERSATIONS_ROUTE, $ as useCrewFoundryStore };
|
|
922
1029
|
|
|
923
1030
|
//# sourceMappingURL=crewfoundryStore.js.map
|