@burdenoff/microfe-crewfoundry 2026.713.1 → 2026.719.1

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.
Files changed (27) hide show
  1. package/dist/crewfoundry/CrewFoundryRoutes.d.ts.map +1 -1
  2. package/dist/crewfoundry/CrewFoundryRoutes.js +53 -49
  3. package/dist/crewfoundry/CrewFoundryRoutes.js.map +1 -1
  4. package/dist/crewfoundry/components/forms/AttachDocumentDialog.d.ts +16 -0
  5. package/dist/crewfoundry/components/forms/AttachDocumentDialog.d.ts.map +1 -0
  6. package/dist/crewfoundry/components/forms/AttachDocumentDialog.js +123 -0
  7. package/dist/crewfoundry/components/forms/AttachDocumentDialog.js.map +1 -0
  8. package/dist/crewfoundry/components/viz/StepProgress.js +64 -3
  9. package/dist/crewfoundry/components/viz/StepProgress.js.map +1 -0
  10. package/dist/crewfoundry/pages/HiringOnboardingPagePage.d.ts +2 -0
  11. package/dist/crewfoundry/pages/HiringOnboardingPagePage.d.ts.map +1 -0
  12. package/dist/crewfoundry/pages/HiringOnboardingPagePage.js +323 -0
  13. package/dist/crewfoundry/pages/HiringOnboardingPagePage.js.map +1 -0
  14. package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.d.ts.map +1 -1
  15. package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js +208 -118
  16. package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js.map +1 -1
  17. package/dist/crewfoundry/store/crewfoundryStore.d.ts +72 -0
  18. package/dist/crewfoundry/store/crewfoundryStore.d.ts.map +1 -1
  19. package/dist/crewfoundry/store/crewfoundryStore.js +224 -116
  20. package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
  21. package/dist/stories/RatingStars.stories.d.ts +10 -0
  22. package/dist/stories/RatingStars.stories.d.ts.map +1 -0
  23. package/dist/stories/SkillBar.stories.d.ts +10 -0
  24. package/dist/stories/SkillBar.stories.d.ts.map +1 -0
  25. package/dist/stories/StatCard.stories.d.ts +10 -0
  26. package/dist/stories/StatCard.stories.d.ts.map +1 -0
  27. package/package.json +14 -3
@@ -1,7 +1,7 @@
1
1
  import { create as e } from "zustand";
2
2
  import { graphqlFetch as t } from "@burdenoff/fe-libs/shared/graphql";
3
3
  //#region src/crewfoundry/store/crewfoundryStore.ts
4
- var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n employees { id firstName lastName email department position status type salary startDate avatar location managerId phone performanceScore skills terminationDate }\n departments { id name headId headName employeeCount budget location status }\n jobPostings { id title department location type experienceLevel salaryMin salaryMax status applicants postedDate deadline description requirements benefits }\n candidates { id firstName lastName email phone position status appliedDate resumeUrl rating source experience skills currentCompany notes hiredDate }\n interviews { id candidateId candidateName position interviewerName date time type status feedback rating }\n announcements { id title content author authorRole category priority isPinned createdAt viewCount tags }\n teams { id name description leadId leadName members memberCount department status projectCount createdAt }\n projects { id name description status priority startDate endDate progress budget spent teamId teamName managerId managerName tasks completedTasks }\n payrollRecords { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod }\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 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 payrollRecords { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod }\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", i = "\n query CrewfoundryOverlapBilling {\n getBillingAccountsByOrg {\n id\n name\n isDefault\n paymentMethods {\n id\n type\n brand\n last4\n isDefault\n expiryMonth\n expiryYear\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) }", S = "mutation CreateCrewVendor($input: CreateCrewVendorInput!) { createCrewVendor(input: $input) { id name category contactPerson email phone status contractValue rating } }", C = "mutation UpdateCrewVendor($id: ID!, $input: UpdateCrewVendorInput!) { updateCrewVendor(id: $id, input: $input) { id name category contactPerson email phone status contractValue rating } }", w = "mutation RemoveCrewVendor($id: ID!) { removeCrewVendor(id: $id) }", T = "mutation CreateCrewClient($input: CreateCrewClientInput!) { createCrewClient(input: $input) { id name industry contactPerson email phone status revenue projects since } }", E = "mutation UpdateCrewClient($id: ID!, $input: UpdateCrewClientInput!) { updateCrewClient(id: $id, input: $input) { id name industry contactPerson email phone status revenue projects since } }", D = "mutation RemoveCrewClient($id: ID!) { removeCrewClient(id: $id) }", O = "mutation CreateCrewTeam($input: CreateCrewTeamInput!) { createCrewTeam(input: $input) { id name description leadId leadName members memberCount department status projectCount createdAt } }", k = "mutation UpdateCrewTeam($id: ID!, $input: UpdateCrewTeamInput!) { updateCrewTeam(id: $id, input: $input) { id name description leadId leadName members memberCount department status projectCount createdAt } }", A = "mutation RemoveCrewTeam($id: ID!) { removeCrewTeam(id: $id) }", j = "mutation CreateCrewProject($input: CreateCrewProjectInput!) { createCrewProject(input: $input) { id name description status priority startDate endDate progress budget spent teamId teamName managerId managerName tasks completedTasks } }", M = "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 } }", ee = "mutation RemoveCrewProject($id: ID!) { removeCrewProject(id: $id) }", te = "mutation CreateCrewDepartment($input: CreateCrewDepartmentInput!) { createCrewDepartment(input: $input) { id name headId headName employeeCount budget location status } }", ne = "mutation UpdateCrewDepartment($id: ID!, $input: UpdateCrewDepartmentInput!) { updateCrewDepartment(id: $id, input: $input) { id name headId headName employeeCount budget location status } }", N = "mutation RemoveCrewDepartment($id: ID!) { removeCrewDepartment(id: $id) }", P = "mutation CreateCrewPayrollRecord($input: CreateCrewPayrollRecordInput!) { createCrewPayrollRecord(input: $input) { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod } }", F = "mutation UpdateCrewPayrollRecord($id: ID!, $input: UpdateCrewPayrollRecordInput!) { updateCrewPayrollRecord(id: $id, input: $input) { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod } }", I = "mutation RemoveCrewPayrollRecord($id: ID!) { removeCrewPayrollRecord(id: $id) }", L = "mutation CreateCrewTimeEntry($input: CreateCrewTimeEntryInput!) { createCrewTimeEntry(input: $input) { id employeeId employeeName date clockIn clockOut totalHours overtime project status billable } }", R = "mutation UpdateCrewTimeEntry($id: ID!, $input: UpdateCrewTimeEntryInput!) { updateCrewTimeEntry(id: $id, input: $input) { id employeeId employeeName date clockIn clockOut totalHours overtime project status billable } }", z = "mutation RemoveCrewTimeEntry($id: ID!) { removeCrewTimeEntry(id: $id) }", B = (e) => e.toUpperCase().replaceAll("-", "_"), V = (e, t) => /* @__PURE__ */ Error(`${e} is served by ${t}; CrewFoundry no longer owns this backend surface.`), H = {
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 payrollRecords { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod }\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 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 payrollRecords { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod }\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", i = "\n query CrewfoundryOverlapBilling {\n getBillingAccountsByOrg {\n id\n name\n isDefault\n paymentMethods {\n id\n type\n brand\n last4\n isDefault\n expiryMonth\n expiryYear\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) }", S = "mutation CreateCrewVendor($input: CreateCrewVendorInput!) { createCrewVendor(input: $input) { id name category contactPerson email phone status contractValue rating } }", C = "mutation UpdateCrewVendor($id: ID!, $input: UpdateCrewVendorInput!) { updateCrewVendor(id: $id, input: $input) { id name category contactPerson email phone status contractValue rating } }", w = "mutation RemoveCrewVendor($id: ID!) { removeCrewVendor(id: $id) }", ee = "mutation CreateCrewClient($input: CreateCrewClientInput!) { createCrewClient(input: $input) { id name industry contactPerson email phone status revenue projects since } }", te = "mutation UpdateCrewClient($id: ID!, $input: UpdateCrewClientInput!) { updateCrewClient(id: $id, input: $input) { id name industry contactPerson email phone status revenue projects since } }", ne = "mutation RemoveCrewClient($id: ID!) { removeCrewClient(id: $id) }", re = "mutation CreateCrewTeam($input: CreateCrewTeamInput!) { createCrewTeam(input: $input) { id name description leadId leadName members memberCount department status projectCount createdAt } }", ie = "mutation UpdateCrewTeam($id: ID!, $input: UpdateCrewTeamInput!) { updateCrewTeam(id: $id, input: $input) { id name description leadId leadName members memberCount department status projectCount createdAt } }", ae = "mutation RemoveCrewTeam($id: ID!) { removeCrewTeam(id: $id) }", oe = "mutation CreateCrewProject($input: CreateCrewProjectInput!) { createCrewProject(input: $input) { id name description status priority startDate endDate progress budget spent teamId teamName managerId managerName tasks completedTasks } }", se = "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 } }", ce = "mutation RemoveCrewProject($id: ID!) { removeCrewProject(id: $id) }", le = "mutation CreateCrewDepartment($input: CreateCrewDepartmentInput!) { createCrewDepartment(input: $input) { id name headId headName employeeCount budget location status } }", ue = "mutation UpdateCrewDepartment($id: ID!, $input: UpdateCrewDepartmentInput!) { updateCrewDepartment(id: $id, input: $input) { id name headId headName employeeCount budget location status } }", de = "mutation RemoveCrewDepartment($id: ID!) { removeCrewDepartment(id: $id) }", fe = "mutation CreateCrewPayrollRecord($input: CreateCrewPayrollRecordInput!) { createCrewPayrollRecord(input: $input) { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod } }", T = "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) }", D = "mutation CreateCrewTimeEntry($input: CreateCrewTimeEntryInput!) { createCrewTimeEntry(input: $input) { id employeeId employeeName date clockIn clockOut totalHours overtime project status billable } }", O = "mutation UpdateCrewTimeEntry($id: ID!, $input: UpdateCrewTimeEntryInput!) { updateCrewTimeEntry(id: $id, input: $input) { id employeeId employeeName date clockIn clockOut totalHours overtime project status billable } }", k = "mutation RemoveCrewTimeEntry($id: ID!) { removeCrewTimeEntry(id: $id) }", A = "query EmployeeDocuments($employeeId: ID!) { employeeDocuments(employeeId: $employeeId) { id employeeId fileId title category uploadedBy uploadedAt } }", j = "mutation AttachEmployeeDocument($input: AttachCrewEmployeeDocumentInput!) { attachEmployeeDocument(input: $input) { id employeeId fileId title category uploadedBy uploadedAt } }", M = "mutation DetachEmployeeDocument($id: ID!) { detachEmployeeDocument(id: $id) }", N = "mutation EnsureFolderByPath($path: String!) { ensureFolderByPath(path: $path) { id } }", P = "mutation InitiateUpload($input: InitiateUploadInput!) { initiateUpload(input: $input) { session { id } uploadUrl } }", F = "mutation CompleteUpload($input: CompleteUploadInput!) { completeUpload(input: $input) { file { id } } }", I = "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 } } }", L = "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 } } }", R = "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 } } }", z = "mutation RemoveCrewOnboarding($id: ID!) { removeCrewOnboarding(id: $id) }", B = "mutation CreateCrewOnboardingTask($input: CreateCrewOnboardingTaskInput!) { createCrewOnboardingTask(input: $input) { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } }", V = "mutation UpdateCrewOnboardingTask($id: ID!, $input: UpdateCrewOnboardingTaskInput!) { updateCrewOnboardingTask(id: $id, input: $input) { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } }", pe = "mutation RemoveCrewOnboardingTask($id: ID!) { removeCrewOnboardingTask(id: $id) }", me = "mutation ToggleCrewOnboardingTask($id: ID!, $completed: Boolean!) { toggleCrewOnboardingTask(id: $id, completed: $completed) { id onboardingId stage title assigneeActorId assigneeName dueDate completedAt sortOrder } }", H = (e) => e.toUpperCase().replaceAll("-", "_"), U = (e, t) => /* @__PURE__ */ Error(`${e} is served by ${t}; CrewFoundry no longer owns this backend surface.`), W = {
5
5
  employee: ["status", "type"],
6
6
  department: ["status"],
7
7
  jobPosting: [
@@ -23,8 +23,10 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
23
23
  paymentMethod: ["type", "status"],
24
24
  invoice: ["status"],
25
25
  vendor: ["status"],
26
- client: ["status"]
27
- }, U = (e, t) => {
26
+ client: ["status"],
27
+ onboarding: ["status", "currentStage"],
28
+ onboardingTask: ["stage"]
29
+ }, G = (e, t) => {
28
30
  if (!e || typeof e != "object") return e;
29
31
  let n = { ...e };
30
32
  for (let e of t) {
@@ -32,22 +34,25 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
32
34
  typeof t == "string" && (n[e] = t.toLowerCase());
33
35
  }
34
36
  return n;
35
- }, W = (e) => e ? e.slice(0, 10) : "TBD", G = (e) => !e || typeof e != "object" || Array.isArray(e) ? null : e, K = (e) => typeof e == "number" ? e : null, q = (e) => typeof e == "string" ? e : null, J = (e) => {
37
+ }, K = (e) => ({
38
+ ...G(e, W.onboarding),
39
+ tasks: (e.tasks ?? []).map((e) => G(e, W.onboardingTask))
40
+ }), q = (e) => e ? e.slice(0, 10) : "TBD", he = (e) => !e || typeof e != "object" || Array.isArray(e) ? null : e, J = (e) => typeof e == "number" ? e : null, Y = (e) => typeof e == "string" ? e : null, ge = (e) => {
36
41
  let t = e.toLowerCase();
37
42
  return t === "active" ? "active" : t === "completed" ? "completed" : t === "cancelled" ? "cancelled" : t === "archived" ? "on_hold" : "planning";
38
- }, Y = (e) => {
43
+ }, X = (e) => {
39
44
  let t = e.toLowerCase();
40
45
  return t === "active" ? "active" : t === "inactive" || t === "archived" || t === "deleted" ? "disbanded" : "forming";
41
- }, X = (e, t) => e.map((e, n) => {
42
- let r = G(e.config), i = K(r?.budget) ?? 25e3 + n * 2500, a = K(r?.spent) ?? Math.round(i * (e.status === "COMPLETED" ? 1 : .62)), o = K(r?.progress) ?? (e.status === "COMPLETED" ? 100 : 58), s = K(r?.tasks) ?? 20 + n % 9, c = K(r?.completedTasks) ?? Math.round(o / 100 * s), l = t[n % Math.max(t.length, 1)];
46
+ }, _e = (e, t) => e.map((e, n) => {
47
+ let r = he(e.config), i = J(r?.budget) ?? 25e3 + n * 2500, a = J(r?.spent) ?? Math.round(i * (e.status === "COMPLETED" ? 1 : .62)), o = J(r?.progress) ?? (e.status === "COMPLETED" ? 100 : 58), s = J(r?.tasks) ?? 20 + n % 9, c = J(r?.completedTasks) ?? Math.round(o / 100 * s), l = t[n % Math.max(t.length, 1)];
43
48
  return {
44
49
  id: e.id,
45
50
  name: e.name,
46
- description: q(r?.description) || `${e.key} delivery plan`,
47
- status: J(e.status),
48
- priority: q(r?.priority)?.toLowerCase() || "medium",
49
- startDate: W(e.createdAt),
50
- endDate: W(e.updatedAt),
51
+ description: Y(r?.description) || `${e.key} delivery plan`,
52
+ status: ge(e.status),
53
+ priority: Y(r?.priority)?.toLowerCase() || "medium",
54
+ startDate: q(e.createdAt),
55
+ endDate: q(e.updatedAt),
51
56
  progress: o,
52
57
  budget: i,
53
58
  spent: a,
@@ -58,7 +63,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
58
63
  tasks: s,
59
64
  completedTasks: c
60
65
  };
61
- }), re = (e) => e.map(({ node: e }) => ({
66
+ }), ve = (e) => e.map(({ node: e }) => ({
62
67
  id: e.id,
63
68
  name: e.name,
64
69
  description: e.description || `${e.name} team workspace`,
@@ -67,10 +72,10 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
67
72
  members: [],
68
73
  memberCount: e.memberCount,
69
74
  department: e.groupType?.toLowerCase().replaceAll("_", " ") || "operations",
70
- status: Y(e.status),
75
+ status: X(e.status),
71
76
  projectCount: 0,
72
- createdAt: W(e.createdAt)
73
- })), ie = (e) => e.filter(({ node: e }) => e.unreadCount > 0).map(({ node: e }) => ({
77
+ createdAt: q(e.createdAt)
78
+ })), ye = (e) => e.filter(({ node: e }) => e.unreadCount > 0).map(({ node: e }) => ({
74
79
  id: `conversation-${e.id}`,
75
80
  title: e.title || "Conversation update",
76
81
  message: `${e.unreadCount} unread in ${e.memberCount}-member channel`,
@@ -79,7 +84,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
79
84
  read: !1,
80
85
  createdAt: e.updatedAt,
81
86
  actionUrl: "/crewfoundry/communications/messages-page"
82
- })), ae = (e) => {
87
+ })), be = (e) => {
83
88
  let t = e.getBillingAccountsByOrg.find((e) => e?.isDefault && e?.id) || e.getBillingAccountsByOrg.find((e) => e?.id);
84
89
  return t?.id ? (t.paymentMethods || []).filter((e) => !!e).map((e) => {
85
90
  let n = e.expiryMonth ? String(e.expiryMonth).padStart(2, "0") : void 0, r = e.expiryYear ? String(e.expiryYear) : void 0, i = e.type === "BANK_TRANSFER" || e.type === "NETBANKING";
@@ -93,11 +98,11 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
93
98
  expiry: n && r ? `${n}/${r}` : void 0
94
99
  };
95
100
  }) : [];
96
- }, oe = (e, t) => {
101
+ }, xe = (e, t) => {
97
102
  if (e.errors?.length) throw Error(e.errors[0]?.message || t);
98
103
  if (!e.data) throw Error(t);
99
104
  return e.data;
100
- }, se = new Set([
105
+ }, Se = new Set([
101
106
  "id",
102
107
  "createdAt",
103
108
  "createdOn",
@@ -119,28 +124,28 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
119
124
  "viewCount",
120
125
  "revenue",
121
126
  "projects"
122
- ]), ce = (e) => {
127
+ ]), Ce = (e) => {
123
128
  if (!e) return e;
124
129
  let t = e.input;
125
130
  if (!t || typeof t != "object" || Array.isArray(t)) return e;
126
131
  let n = {};
127
- for (let [e, r] of Object.entries(t)) se.has(e) || (n[e] = r);
132
+ for (let [e, r] of Object.entries(t)) Se.has(e) || (n[e] = r);
128
133
  return {
129
134
  ...e,
130
135
  input: n
131
136
  };
132
- }, Z = async (e, n, r, i, a = "workspace") => oe(await t({
137
+ }, Z = async (e, n, r, i, a = "workspace") => xe(await t({
133
138
  gateway: a,
134
139
  query: e,
135
- variables: ce(n),
140
+ variables: Ce(n),
136
141
  authToken: r.authToken,
137
142
  baseUrl: a === "workspace" ? r.apiGatewayUrl : void 0,
138
143
  extraHeaders: { ...a === "workspace" && r.workspaceId ? { "x-workspace-id": r.workspaceId } : {} }
139
- }), i), le = () => !1, Q = async (e, t, n, r, i = "workspace") => {
144
+ }), i), we = () => !1, Q = async (e, t, n, r, i = "workspace") => {
140
145
  try {
141
146
  return await Z(e, t, n, r, i);
142
147
  } catch (e) {
143
- return le() && console.warn(`[crewfoundry] overlap query skipped: ${r}`, e), null;
148
+ return we() && console.warn(`[crewfoundry] overlap query skipped: ${r}`, e), null;
144
149
  }
145
150
  }, $ = e((e) => ({
146
151
  metrics: [
@@ -219,6 +224,9 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
219
224
  invoices: [],
220
225
  vendors: [],
221
226
  clients: [],
227
+ employeeDocuments: [],
228
+ onboardings: [],
229
+ onboardingsLoaded: !1,
222
230
  initializeData: async (t) => {
223
231
  if (t.workspaceId) {
224
232
  e({
@@ -235,7 +243,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
235
243
  },
236
244
  groupFirst: 30,
237
245
  conversationFirst: 30
238
- }, t, "Unable to load workspace bootstrap with overlap data"), Q(i, void 0, t, "Unable to load overlap billing data", "global")]), s = a ? a.crewfoundryBootstrap : (await Z(n, void 0, t, "Unable to load CrewFoundry data")).crewfoundryBootstrap, c = a ? re(a.groups.edges) : [], l = a ? X(a.projects.items, c) : [], u = a ? ie(a.conversations.edges) : [], d = c.length > 0 ? c : s.teams, f = l.length > 0 ? l : s.projects, p = u, m = o ? ae(o) : [], h = s.employees.map((e) => U(e, H.employee)), g = s.departments.map((e) => U(e, H.department)), _ = s.jobPostings.map((e) => U(e, H.jobPosting)), v = s.candidates.map((e) => U(e, H.candidate)), y = s.interviews.map((e) => U(e, H.interview)), b = [], x = [], S = s.announcements.map((e) => U(e, H.announcement)), C = d.map((e) => U(e, H.team)), w = f.map((e) => U(e, H.project));
246
+ }, t, "Unable to load workspace bootstrap with overlap data"), Q(i, void 0, t, "Unable to load overlap billing data", "global")]), s = a ? a.crewfoundryBootstrap : (await Z(n, void 0, t, "Unable to load CrewFoundry data")).crewfoundryBootstrap, c = a ? ve(a.groups.edges) : [], l = a ? _e(a.projects.items, c) : [], u = a ? ye(a.conversations.edges) : [], d = c.length > 0 ? c : s.teams, f = l.length > 0 ? l : s.projects, p = u, m = o ? be(o) : [], h = s.employees.map((e) => G(e, W.employee)), g = s.departments.map((e) => G(e, W.department)), _ = s.jobPostings.map((e) => G(e, W.jobPosting)), v = s.candidates.map((e) => G(e, W.candidate)), y = s.interviews.map((e) => G(e, W.interview)), b = [], x = [], S = s.announcements.map((e) => G(e, W.announcement)), C = d.map((e) => G(e, W.team)), w = f.map((e) => G(e, W.project));
239
247
  e({
240
248
  employees: h,
241
249
  departments: g,
@@ -248,14 +256,14 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
248
256
  announcements: S,
249
257
  teams: C,
250
258
  projects: w,
251
- payrollRecords: s.payrollRecords.map((e) => U(e, H.payrollRecord)),
252
- leaveRequests: s.leaveRequests.map((e) => U(e, H.leaveRequest)),
253
- timeEntries: s.timeEntries.map((e) => U(e, H.timeEntry)),
254
- notifications: p.map((e) => U(e, H.notification)),
255
- paymentMethods: m.map((e) => U(e, H.paymentMethod)),
259
+ payrollRecords: s.payrollRecords.map((e) => G(e, W.payrollRecord)),
260
+ leaveRequests: s.leaveRequests.map((e) => G(e, W.leaveRequest)),
261
+ timeEntries: s.timeEntries.map((e) => G(e, W.timeEntry)),
262
+ notifications: p.map((e) => G(e, W.notification)),
263
+ paymentMethods: m.map((e) => G(e, W.paymentMethod)),
256
264
  invoices: [],
257
- vendors: s.vendors.map((e) => U(e, H.vendor)),
258
- clients: s.clients.map((e) => U(e, H.client)),
265
+ vendors: s.vendors.map((e) => G(e, W.vendor)),
266
+ clients: s.clients.map((e) => G(e, W.client)),
259
267
  metrics: [
260
268
  {
261
269
  label: "Total Employees",
@@ -294,21 +302,21 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
294
302
  addEmployee: async (t) => {
295
303
  let n = $.getState().initParams, r = await Z(a, { input: {
296
304
  ...t,
297
- status: B(t.status),
298
- type: B(t.type)
305
+ status: H(t.status),
306
+ type: H(t.type)
299
307
  } }, n, "Unable to create employee");
300
- e((e) => ({ employees: [U(r.createCrewEmployee, H.employee), ...e.employees] }));
308
+ e((e) => ({ employees: [G(r.createCrewEmployee, W.employee), ...e.employees] }));
301
309
  },
302
310
  updateEmployee: async (t, n) => {
303
311
  let r = $.getState().initParams, i = await Z(o, {
304
312
  id: t,
305
313
  input: {
306
314
  ...n,
307
- ...n.status ? { status: B(n.status) } : {},
308
- ...n.type ? { type: B(n.type) } : {}
315
+ ...n.status ? { status: H(n.status) } : {},
316
+ ...n.type ? { type: H(n.type) } : {}
309
317
  }
310
318
  }, r, "Unable to update employee");
311
- e((e) => ({ employees: e.employees.map((e) => e.id === t ? U(i.updateCrewEmployee, H.employee) : e) }));
319
+ e((e) => ({ employees: e.employees.map((e) => e.id === t ? G(i.updateCrewEmployee, W.employee) : e) }));
312
320
  },
313
321
  removeEmployee: async (t) => {
314
322
  let n = $.getState().initParams;
@@ -317,59 +325,59 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
317
325
  addJobPosting: async (t) => {
318
326
  let n = $.getState().initParams, r = await Z(c, { input: {
319
327
  ...t,
320
- status: B(t.status)
328
+ status: H(t.status)
321
329
  } }, n, "Unable to create job posting");
322
- e((e) => ({ jobPostings: [U(r.createCrewJobPosting, H.jobPosting), ...e.jobPostings] }));
330
+ e((e) => ({ jobPostings: [G(r.createCrewJobPosting, W.jobPosting), ...e.jobPostings] }));
323
331
  },
324
332
  updateJobPosting: async (t, n) => {
325
333
  let r = $.getState().initParams, i = await Z(l, {
326
334
  id: t,
327
335
  input: {
328
336
  ...n,
329
- ...n.status ? { status: B(n.status) } : {}
337
+ ...n.status ? { status: H(n.status) } : {}
330
338
  }
331
339
  }, r, "Unable to update job posting");
332
- e((e) => ({ jobPostings: e.jobPostings.map((e) => e.id === t ? U(i.updateCrewJobPosting, H.jobPosting) : e) }));
340
+ e((e) => ({ jobPostings: e.jobPostings.map((e) => e.id === t ? G(i.updateCrewJobPosting, W.jobPosting) : e) }));
333
341
  },
334
342
  addCandidate: async (t) => {
335
343
  let n = $.getState().initParams, r = await Z(u, { input: {
336
344
  ...t,
337
- status: B(t.status)
345
+ status: H(t.status)
338
346
  } }, n, "Unable to create candidate");
339
- e((e) => ({ candidates: [U(r.createCrewCandidate, H.candidate), ...e.candidates] }));
347
+ e((e) => ({ candidates: [G(r.createCrewCandidate, W.candidate), ...e.candidates] }));
340
348
  },
341
349
  updateCandidate: async (t, n) => {
342
350
  let r = $.getState().initParams, i = await Z(d, {
343
351
  id: t,
344
352
  input: {
345
353
  ...n,
346
- ...n.status ? { status: B(n.status) } : {}
354
+ ...n.status ? { status: H(n.status) } : {}
347
355
  }
348
356
  }, r, "Unable to update candidate");
349
- e((e) => ({ candidates: e.candidates.map((e) => e.id === t ? U(i.updateCrewCandidate, H.candidate) : e) }));
357
+ e((e) => ({ candidates: e.candidates.map((e) => e.id === t ? G(i.updateCrewCandidate, W.candidate) : e) }));
350
358
  },
351
359
  addAnnouncement: async (t) => {
352
360
  let n = $.getState().initParams, r = await Z(f, { input: t }, n, "Unable to create announcement");
353
- e((e) => ({ announcements: [U(r.createCrewAnnouncement, H.announcement), ...e.announcements] }));
361
+ e((e) => ({ announcements: [G(r.createCrewAnnouncement, W.announcement), ...e.announcements] }));
354
362
  },
355
363
  addLeaveRequest: async (t) => {
356
364
  let n = $.getState().initParams, r = await Z(p, { input: {
357
365
  ...t,
358
- type: B(t.type),
359
- status: B(t.status)
366
+ type: H(t.type),
367
+ status: H(t.status)
360
368
  } }, n, "Unable to create leave request");
361
- e((e) => ({ leaveRequests: [U(r.createCrewLeaveRequest, H.leaveRequest), ...e.leaveRequests] }));
369
+ e((e) => ({ leaveRequests: [G(r.createCrewLeaveRequest, W.leaveRequest), ...e.leaveRequests] }));
362
370
  },
363
371
  updateLeaveRequest: async (t, n) => {
364
372
  let r = $.getState().initParams, i = await Z(m, {
365
373
  id: t,
366
374
  input: {
367
375
  ...n,
368
- ...n.type ? { type: B(n.type) } : {},
369
- ...n.status ? { status: B(n.status) } : {}
376
+ ...n.type ? { type: H(n.type) } : {},
377
+ ...n.status ? { status: H(n.status) } : {}
370
378
  }
371
379
  }, r, "Unable to update leave request");
372
- e((e) => ({ leaveRequests: e.leaveRequests.map((e) => e.id === t ? U(i.updateCrewLeaveRequest, H.leaveRequest) : e) }));
380
+ e((e) => ({ leaveRequests: e.leaveRequests.map((e) => e.id === t ? G(i.updateCrewLeaveRequest, W.leaveRequest) : e) }));
373
381
  },
374
382
  markNotificationRead: async (t) => {
375
383
  e((e) => ({ notifications: e.notifications.map((e) => e.id === t ? {
@@ -396,7 +404,7 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
396
404
  id: t,
397
405
  input: n
398
406
  }, r, "Unable to update announcement");
399
- e((e) => ({ announcements: e.announcements.map((e) => e.id === t ? U(i.updateCrewAnnouncement, H.announcement) : e) }));
407
+ e((e) => ({ announcements: e.announcements.map((e) => e.id === t ? G(i.updateCrewAnnouncement, W.announcement) : e) }));
400
408
  },
401
409
  removeAnnouncement: async (t) => {
402
410
  let n = $.getState().initParams;
@@ -405,195 +413,295 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
405
413
  addInterview: async (t) => {
406
414
  let n = $.getState().initParams, r = await Z(y, { input: {
407
415
  ...t,
408
- type: B(t.type),
409
- status: B(t.status)
416
+ type: H(t.type),
417
+ status: H(t.status)
410
418
  } }, n, "Unable to schedule interview");
411
- e((e) => ({ interviews: [U(r.createCrewInterview, H.interview), ...e.interviews] }));
419
+ e((e) => ({ interviews: [G(r.createCrewInterview, W.interview), ...e.interviews] }));
412
420
  },
413
421
  updateInterview: async (t, n) => {
414
422
  let r = $.getState().initParams, i = await Z(b, {
415
423
  id: t,
416
424
  input: {
417
425
  ...n,
418
- ...n.type ? { type: B(n.type) } : {},
419
- ...n.status ? { status: B(n.status) } : {}
426
+ ...n.type ? { type: H(n.type) } : {},
427
+ ...n.status ? { status: H(n.status) } : {}
420
428
  }
421
429
  }, r, "Unable to update interview");
422
- e((e) => ({ interviews: e.interviews.map((e) => e.id === t ? U(i.updateCrewInterview, H.interview) : e) }));
430
+ e((e) => ({ interviews: e.interviews.map((e) => e.id === t ? G(i.updateCrewInterview, W.interview) : e) }));
423
431
  },
424
432
  removeInterview: async (t) => {
425
433
  let n = $.getState().initParams;
426
434
  await Z(x, { id: t }, n, "Unable to remove interview"), e((e) => ({ interviews: e.interviews.filter((e) => e.id !== t) }));
427
435
  },
428
436
  addInvoice: async () => {
429
- throw V("Invoices", "global-billing-svc");
437
+ throw U("Invoices", "global-billing-svc");
430
438
  },
431
439
  updateInvoice: async () => {
432
- throw V("Invoices", "global-billing-svc");
440
+ throw U("Invoices", "global-billing-svc");
433
441
  },
434
442
  removeInvoice: async () => {
435
- throw V("Invoices", "global-billing-svc");
443
+ throw U("Invoices", "global-billing-svc");
436
444
  },
437
445
  addVendor: async (t) => {
438
446
  let n = $.getState().initParams, r = await Z(S, { input: {
439
447
  ...t,
440
- status: B(t.status)
448
+ status: H(t.status)
441
449
  } }, n, "Unable to create vendor");
442
- e((e) => ({ vendors: [U(r.createCrewVendor, H.vendor), ...e.vendors] }));
450
+ e((e) => ({ vendors: [G(r.createCrewVendor, W.vendor), ...e.vendors] }));
443
451
  },
444
452
  updateVendor: async (t, n) => {
445
453
  let r = $.getState().initParams, i = await Z(C, {
446
454
  id: t,
447
455
  input: {
448
456
  ...n,
449
- ...n.status ? { status: B(n.status) } : {}
457
+ ...n.status ? { status: H(n.status) } : {}
450
458
  }
451
459
  }, r, "Unable to update vendor");
452
- e((e) => ({ vendors: e.vendors.map((e) => e.id === t ? U(i.updateCrewVendor, H.vendor) : e) }));
460
+ e((e) => ({ vendors: e.vendors.map((e) => e.id === t ? G(i.updateCrewVendor, W.vendor) : e) }));
453
461
  },
454
462
  removeVendor: async (t) => {
455
463
  let n = $.getState().initParams;
456
464
  await Z(w, { id: t }, n, "Unable to remove vendor"), e((e) => ({ vendors: e.vendors.filter((e) => e.id !== t) }));
457
465
  },
458
466
  addClient: async (t) => {
459
- let n = $.getState().initParams, r = await Z(T, { input: {
467
+ let n = $.getState().initParams, r = await Z(ee, { input: {
460
468
  ...t,
461
- status: B(t.status)
469
+ status: H(t.status)
462
470
  } }, n, "Unable to create client");
463
- e((e) => ({ clients: [U(r.createCrewClient, H.client), ...e.clients] }));
471
+ e((e) => ({ clients: [G(r.createCrewClient, W.client), ...e.clients] }));
464
472
  },
465
473
  updateClient: async (t, n) => {
466
- let r = $.getState().initParams, i = await Z(E, {
474
+ let r = $.getState().initParams, i = await Z(te, {
467
475
  id: t,
468
476
  input: {
469
477
  ...n,
470
- ...n.status ? { status: B(n.status) } : {}
478
+ ...n.status ? { status: H(n.status) } : {}
471
479
  }
472
480
  }, r, "Unable to update client");
473
- e((e) => ({ clients: e.clients.map((e) => e.id === t ? U(i.updateCrewClient, H.client) : e) }));
481
+ e((e) => ({ clients: e.clients.map((e) => e.id === t ? G(i.updateCrewClient, W.client) : e) }));
474
482
  },
475
483
  removeClient: async (t) => {
476
484
  let n = $.getState().initParams;
477
- await Z(D, { id: t }, n, "Unable to remove client"), e((e) => ({ clients: e.clients.filter((e) => e.id !== t) }));
485
+ await Z(ne, { id: t }, n, "Unable to remove client"), e((e) => ({ clients: e.clients.filter((e) => e.id !== t) }));
478
486
  },
479
487
  addTeam: async (t) => {
480
- let n = $.getState().initParams, r = await Z(O, { input: t }, n, "Unable to create team");
481
- e((e) => ({ teams: [U(r.createCrewTeam, H.team), ...e.teams] }));
488
+ let n = $.getState().initParams, r = await Z(re, { input: t }, n, "Unable to create team");
489
+ e((e) => ({ teams: [G(r.createCrewTeam, W.team), ...e.teams] }));
482
490
  },
483
491
  updateTeam: async (t, n) => {
484
- let r = $.getState().initParams, i = await Z(k, {
492
+ let r = $.getState().initParams, i = await Z(ie, {
485
493
  id: t,
486
494
  input: n
487
495
  }, r, "Unable to update team");
488
- e((e) => ({ teams: e.teams.map((e) => e.id === t ? U(i.updateCrewTeam, H.team) : e) }));
496
+ e((e) => ({ teams: e.teams.map((e) => e.id === t ? G(i.updateCrewTeam, W.team) : e) }));
489
497
  },
490
498
  removeTeam: async (t) => {
491
499
  let n = $.getState().initParams;
492
- await Z(A, { id: t }, n, "Unable to remove team"), e((e) => ({ teams: e.teams.filter((e) => e.id !== t) }));
500
+ await Z(ae, { id: t }, n, "Unable to remove team"), e((e) => ({ teams: e.teams.filter((e) => e.id !== t) }));
493
501
  },
494
502
  addProject: async (t) => {
495
- let n = $.getState().initParams, r = await Z(j, { input: {
503
+ let n = $.getState().initParams, r = await Z(oe, { input: {
496
504
  ...t,
497
- status: B(t.status),
498
- priority: B(t.priority)
505
+ status: H(t.status),
506
+ priority: H(t.priority)
499
507
  } }, n, "Unable to create project");
500
- e((e) => ({ projects: [U(r.createCrewProject, H.project), ...e.projects] }));
508
+ e((e) => ({ projects: [G(r.createCrewProject, W.project), ...e.projects] }));
501
509
  },
502
510
  updateProject: async (t, n) => {
503
- let r = $.getState().initParams, i = await Z(M, {
511
+ let r = $.getState().initParams, i = await Z(se, {
504
512
  id: t,
505
513
  input: {
506
514
  ...n,
507
- ...n.status ? { status: B(n.status) } : {},
508
- ...n.priority ? { priority: B(n.priority) } : {}
515
+ ...n.status ? { status: H(n.status) } : {},
516
+ ...n.priority ? { priority: H(n.priority) } : {}
509
517
  }
510
518
  }, r, "Unable to update project");
511
- e((e) => ({ projects: e.projects.map((e) => e.id === t ? U(i.updateCrewProject, H.project) : e) }));
519
+ e((e) => ({ projects: e.projects.map((e) => e.id === t ? G(i.updateCrewProject, W.project) : e) }));
512
520
  },
513
521
  removeProject: async (t) => {
514
522
  let n = $.getState().initParams;
515
- await Z(ee, { id: t }, n, "Unable to remove project"), e((e) => ({ projects: e.projects.filter((e) => e.id !== t) }));
523
+ await Z(ce, { id: t }, n, "Unable to remove project"), e((e) => ({ projects: e.projects.filter((e) => e.id !== t) }));
516
524
  },
517
525
  addMarketplaceService: async () => {
518
- throw V("Marketplace services", "global-store-svc");
526
+ throw U("Marketplace services", "global-store-svc");
519
527
  },
520
528
  updateMarketplaceService: async () => {
521
- throw V("Marketplace services", "global-store-svc");
529
+ throw U("Marketplace services", "global-store-svc");
522
530
  },
523
531
  removeMarketplaceService: async () => {
524
- throw V("Marketplace services", "global-store-svc");
532
+ throw U("Marketplace services", "global-store-svc");
525
533
  },
526
534
  addDepartment: async (t) => {
527
- let n = $.getState().initParams, r = await Z(te, { input: t }, n, "Unable to create department");
528
- e((e) => ({ departments: [U(r.createCrewDepartment, H.department), ...e.departments] }));
535
+ let n = $.getState().initParams, r = await Z(le, { input: t }, n, "Unable to create department");
536
+ e((e) => ({ departments: [G(r.createCrewDepartment, W.department), ...e.departments] }));
529
537
  },
530
538
  updateDepartment: async (t, n) => {
531
- let r = $.getState().initParams, i = await Z(ne, {
539
+ let r = $.getState().initParams, i = await Z(ue, {
532
540
  id: t,
533
541
  input: n
534
542
  }, r, "Unable to update department");
535
- e((e) => ({ departments: e.departments.map((e) => e.id === t ? U(i.updateCrewDepartment, H.department) : e) }));
543
+ e((e) => ({ departments: e.departments.map((e) => e.id === t ? G(i.updateCrewDepartment, W.department) : e) }));
536
544
  },
537
545
  removeDepartment: async (t) => {
538
546
  let n = $.getState().initParams;
539
- await Z(N, { id: t }, n, "Unable to remove department"), e((e) => ({ departments: e.departments.filter((e) => e.id !== t) }));
547
+ await Z(de, { id: t }, n, "Unable to remove department"), e((e) => ({ departments: e.departments.filter((e) => e.id !== t) }));
540
548
  },
541
549
  addCourse: async () => {
542
- throw V("Courses", "wspace-learning-svc");
550
+ throw U("Courses", "wspace-learning-svc");
543
551
  },
544
552
  updateCourse: async () => {
545
- throw V("Courses", "wspace-learning-svc");
553
+ throw U("Courses", "wspace-learning-svc");
546
554
  },
547
555
  removeCourse: async () => {
548
- throw V("Courses", "wspace-learning-svc");
556
+ throw U("Courses", "wspace-learning-svc");
549
557
  },
550
558
  enrollCourse: async () => {
551
- throw V("Course enrollment", "wspace-learning-svc");
559
+ throw U("Course enrollment", "wspace-learning-svc");
552
560
  },
553
561
  addLearningPath: async () => {
554
- throw V("Learning paths", "wspace-learning-svc");
562
+ throw U("Learning paths", "wspace-learning-svc");
555
563
  },
556
564
  updateLearningPath: async () => {
557
- throw V("Learning paths", "wspace-learning-svc");
565
+ throw U("Learning paths", "wspace-learning-svc");
558
566
  },
559
567
  removeLearningPath: async () => {
560
- throw V("Learning paths", "wspace-learning-svc");
568
+ throw U("Learning paths", "wspace-learning-svc");
561
569
  },
562
570
  addPayrollRecord: async (t) => {
563
- let n = $.getState().initParams, r = await Z(P, { input: {
571
+ let n = $.getState().initParams, r = await Z(fe, { input: {
564
572
  ...t,
565
- status: B(t.status)
573
+ status: H(t.status)
566
574
  } }, n, "Unable to create payroll record");
567
- e((e) => ({ payrollRecords: [U(r.createCrewPayrollRecord, H.payrollRecord), ...e.payrollRecords] }));
575
+ e((e) => ({ payrollRecords: [G(r.createCrewPayrollRecord, W.payrollRecord), ...e.payrollRecords] }));
568
576
  },
569
577
  updatePayrollRecord: async (t, n) => {
570
- let r = $.getState().initParams, i = await Z(F, {
578
+ let r = $.getState().initParams, i = await Z(T, {
571
579
  id: t,
572
580
  input: {
573
581
  ...n,
574
- ...n.status ? { status: B(n.status) } : {}
582
+ ...n.status ? { status: H(n.status) } : {}
575
583
  }
576
584
  }, r, "Unable to update payroll record");
577
- e((e) => ({ payrollRecords: e.payrollRecords.map((e) => e.id === t ? U(i.updateCrewPayrollRecord, H.payrollRecord) : e) }));
585
+ e((e) => ({ payrollRecords: e.payrollRecords.map((e) => e.id === t ? G(i.updateCrewPayrollRecord, W.payrollRecord) : e) }));
578
586
  },
579
587
  removePayrollRecord: async (t) => {
580
588
  let n = $.getState().initParams;
581
- await Z(I, { id: t }, n, "Unable to remove payroll record"), e((e) => ({ payrollRecords: e.payrollRecords.filter((e) => e.id !== t) }));
589
+ await Z(E, { id: t }, n, "Unable to remove payroll record"), e((e) => ({ payrollRecords: e.payrollRecords.filter((e) => e.id !== t) }));
582
590
  },
583
591
  addTimeEntry: async (t) => {
584
- let n = $.getState().initParams, r = await Z(L, { input: t }, n, "Unable to create time entry");
585
- e((e) => ({ timeEntries: [U(r.createCrewTimeEntry, H.timeEntry), ...e.timeEntries] }));
592
+ let n = $.getState().initParams, r = await Z(D, { input: t }, n, "Unable to create time entry");
593
+ e((e) => ({ timeEntries: [G(r.createCrewTimeEntry, W.timeEntry), ...e.timeEntries] }));
586
594
  },
587
595
  updateTimeEntry: async (t, n) => {
588
- let r = $.getState().initParams, i = await Z(R, {
596
+ let r = $.getState().initParams, i = await Z(O, {
589
597
  id: t,
590
598
  input: n
591
599
  }, r, "Unable to update time entry");
592
- e((e) => ({ timeEntries: e.timeEntries.map((e) => e.id === t ? U(i.updateCrewTimeEntry, H.timeEntry) : e) }));
600
+ e((e) => ({ timeEntries: e.timeEntries.map((e) => e.id === t ? G(i.updateCrewTimeEntry, W.timeEntry) : e) }));
593
601
  },
594
602
  removeTimeEntry: async (t) => {
595
603
  let n = $.getState().initParams;
596
- await Z(z, { id: t }, n, "Unable to remove time entry"), e((e) => ({ timeEntries: e.timeEntries.filter((e) => e.id !== t) }));
604
+ await Z(k, { id: t }, n, "Unable to remove time entry"), e((e) => ({ timeEntries: e.timeEntries.filter((e) => e.id !== t) }));
605
+ },
606
+ fetchEmployeeDocuments: async (t) => {
607
+ let n = $.getState().initParams, r = await Z(A, { employeeId: t }, n, "Unable to load employee documents");
608
+ e((e) => ({ employeeDocuments: [...e.employeeDocuments.filter((e) => e.employeeId !== t), ...r.employeeDocuments] }));
609
+ },
610
+ uploadEmployeeDocument: async ({ employeeId: t, file: n, title: r, category: i }) => {
611
+ let a = $.getState().initParams, o = await Z(N, { 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 Z(P, { input: {
612
+ fileName: n.name,
613
+ fileSize: String(n.size),
614
+ mimeType: n.type || "application/octet-stream",
615
+ extension: s,
616
+ folderId: o.ensureFolderByPath.id
617
+ } }, a, "Unable to start the document upload");
618
+ if (c.initiateUpload.uploadUrl) {
619
+ let e = await fetch(c.initiateUpload.uploadUrl, {
620
+ method: "PUT",
621
+ headers: { "Content-Type": n.type || "application/octet-stream" },
622
+ body: n
623
+ });
624
+ if (!e.ok) throw Error(`Failed to upload file bytes (status ${e.status})`);
625
+ }
626
+ let l = await Z(j, { input: {
627
+ employeeId: t,
628
+ fileId: (await Z(F, { input: {
629
+ sessionId: c.initiateUpload.session.id,
630
+ fileSize: String(n.size),
631
+ folderId: o.ensureFolderByPath.id
632
+ } }, a, "Unable to finish the document upload")).completeUpload.file.id,
633
+ title: r,
634
+ category: i || void 0
635
+ } }, a, "Unable to attach the document to this employee");
636
+ e((e) => ({ employeeDocuments: [l.attachEmployeeDocument, ...e.employeeDocuments] }));
637
+ },
638
+ detachEmployeeDocument: async (t) => {
639
+ let n = $.getState().initParams;
640
+ await Z(M, { id: t }, n, "Unable to remove this document"), e((e) => ({ employeeDocuments: e.employeeDocuments.filter((e) => e.id !== t) }));
641
+ },
642
+ fetchOnboardings: async () => {
643
+ let t = $.getState().initParams;
644
+ e({
645
+ onboardings: (await Z(I, {}, t, "Unable to load onboarding")).crewOnboardings.map(K),
646
+ onboardingsLoaded: !0
647
+ });
648
+ },
649
+ createOnboarding: async (t) => {
650
+ let n = $.getState().initParams, r = await Z(L, { input: t }, n, "Unable to start onboarding");
651
+ e((e) => ({ onboardings: [K(r.createCrewOnboarding), ...e.onboardings] }));
652
+ },
653
+ updateOnboarding: async (t, n) => {
654
+ let r = $.getState().initParams, i = await Z(R, {
655
+ id: t,
656
+ input: n
657
+ }, r, "Unable to update onboarding");
658
+ e((e) => ({ onboardings: e.onboardings.map((e) => e.id === t ? K(i.updateCrewOnboarding) : e) }));
659
+ },
660
+ removeOnboarding: async (t) => {
661
+ let n = $.getState().initParams;
662
+ await Z(z, { id: t }, n, "Unable to remove onboarding"), e((e) => ({ onboardings: e.onboardings.filter((e) => e.id !== t) }));
663
+ },
664
+ createOnboardingTask: async (t) => {
665
+ let n = $.getState().initParams, r = G((await Z(B, { input: t }, n, "Unable to create onboarding task")).createCrewOnboardingTask, W.onboardingTask);
666
+ e((e) => ({ onboardings: e.onboardings.map((e) => e.id === r.onboardingId ? {
667
+ ...e,
668
+ tasks: [...e.tasks, r],
669
+ totalTaskCount: e.totalTaskCount + 1
670
+ } : e) }));
671
+ },
672
+ updateOnboardingTask: async (t, n) => {
673
+ let r = $.getState().initParams, i = G((await Z(V, {
674
+ id: t,
675
+ input: n
676
+ }, r, "Unable to update onboarding task")).updateCrewOnboardingTask, W.onboardingTask);
677
+ e((e) => ({ onboardings: e.onboardings.map((e) => e.id === i.onboardingId ? {
678
+ ...e,
679
+ tasks: e.tasks.map((e) => e.id === t ? i : e)
680
+ } : e) }));
681
+ },
682
+ removeOnboardingTask: async (t) => {
683
+ let n = $.getState().initParams;
684
+ await Z(pe, { id: t }, n, "Unable to remove onboarding task"), e((e) => ({ onboardings: e.onboardings.map((e) => e.tasks.some((e) => e.id === t) ? {
685
+ ...e,
686
+ tasks: e.tasks.filter((e) => e.id !== t),
687
+ totalTaskCount: Math.max(0, e.totalTaskCount - 1)
688
+ } : e) }));
689
+ },
690
+ toggleOnboardingTask: async (t, n) => {
691
+ let r = $.getState().initParams, i = G((await Z(me, {
692
+ id: t,
693
+ completed: n
694
+ }, r, "Unable to update onboarding task")).toggleCrewOnboardingTask, W.onboardingTask);
695
+ e((e) => ({ onboardings: e.onboardings.map((e) => {
696
+ if (e.id !== i.onboardingId) return e;
697
+ let n = e.tasks.map((e) => e.id === t ? i : e), r = n.filter((e) => e.completedAt).length;
698
+ return {
699
+ ...e,
700
+ tasks: n,
701
+ completedTaskCount: r,
702
+ progressPercent: n.length === 0 ? 0 : Math.round(r / n.length * 1e3) / 10
703
+ };
704
+ }) }));
597
705
  }
598
706
  }));
599
707
  //#endregion