@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.
- package/dist/crewfoundry/CrewFoundryRoutes.d.ts.map +1 -1
- package/dist/crewfoundry/CrewFoundryRoutes.js +53 -49
- package/dist/crewfoundry/CrewFoundryRoutes.js.map +1 -1
- package/dist/crewfoundry/components/forms/AttachDocumentDialog.d.ts +16 -0
- package/dist/crewfoundry/components/forms/AttachDocumentDialog.d.ts.map +1 -0
- package/dist/crewfoundry/components/forms/AttachDocumentDialog.js +123 -0
- package/dist/crewfoundry/components/forms/AttachDocumentDialog.js.map +1 -0
- package/dist/crewfoundry/components/viz/StepProgress.js +64 -3
- package/dist/crewfoundry/components/viz/StepProgress.js.map +1 -0
- package/dist/crewfoundry/pages/HiringOnboardingPagePage.d.ts +2 -0
- package/dist/crewfoundry/pages/HiringOnboardingPagePage.d.ts.map +1 -0
- package/dist/crewfoundry/pages/HiringOnboardingPagePage.js +323 -0
- package/dist/crewfoundry/pages/HiringOnboardingPagePage.js.map +1 -0
- package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js +208 -118
- package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.d.ts +72 -0
- package/dist/crewfoundry/store/crewfoundryStore.d.ts.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.js +224 -116
- package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
- package/dist/stories/RatingStars.stories.d.ts +10 -0
- package/dist/stories/RatingStars.stories.d.ts.map +1 -0
- package/dist/stories/SkillBar.stories.d.ts +10 -0
- package/dist/stories/SkillBar.stories.d.ts.map +1 -0
- package/dist/stories/StatCard.stories.d.ts +10 -0
- package/dist/stories/StatCard.stories.d.ts.map +1 -0
- 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
|
-
|
|
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
|
-
},
|
|
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
|
-
},
|
|
43
|
+
}, X = (e) => {
|
|
39
44
|
let t = e.toLowerCase();
|
|
40
45
|
return t === "active" ? "active" : t === "inactive" || t === "archived" || t === "deleted" ? "disbanded" : "forming";
|
|
41
|
-
},
|
|
42
|
-
let r =
|
|
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:
|
|
47
|
-
status:
|
|
48
|
-
priority:
|
|
49
|
-
startDate:
|
|
50
|
-
endDate:
|
|
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
|
-
}),
|
|
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:
|
|
75
|
+
status: X(e.status),
|
|
71
76
|
projectCount: 0,
|
|
72
|
-
createdAt:
|
|
73
|
-
})),
|
|
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
|
-
})),
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
]),
|
|
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))
|
|
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") =>
|
|
137
|
+
}, Z = async (e, n, r, i, a = "workspace") => xe(await t({
|
|
133
138
|
gateway: a,
|
|
134
139
|
query: e,
|
|
135
|
-
variables:
|
|
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),
|
|
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
|
|
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 ?
|
|
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) =>
|
|
252
|
-
leaveRequests: s.leaveRequests.map((e) =>
|
|
253
|
-
timeEntries: s.timeEntries.map((e) =>
|
|
254
|
-
notifications: p.map((e) =>
|
|
255
|
-
paymentMethods: m.map((e) =>
|
|
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) =>
|
|
258
|
-
clients: s.clients.map((e) =>
|
|
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:
|
|
298
|
-
type:
|
|
305
|
+
status: H(t.status),
|
|
306
|
+
type: H(t.type)
|
|
299
307
|
} }, n, "Unable to create employee");
|
|
300
|
-
e((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:
|
|
308
|
-
...n.type ? { 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 ?
|
|
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:
|
|
328
|
+
status: H(t.status)
|
|
321
329
|
} }, n, "Unable to create job posting");
|
|
322
|
-
e((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:
|
|
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 ?
|
|
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:
|
|
345
|
+
status: H(t.status)
|
|
338
346
|
} }, n, "Unable to create candidate");
|
|
339
|
-
e((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:
|
|
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 ?
|
|
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: [
|
|
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:
|
|
359
|
-
status:
|
|
366
|
+
type: H(t.type),
|
|
367
|
+
status: H(t.status)
|
|
360
368
|
} }, n, "Unable to create leave request");
|
|
361
|
-
e((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:
|
|
369
|
-
...n.status ? { 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 ?
|
|
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 ?
|
|
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:
|
|
409
|
-
status:
|
|
416
|
+
type: H(t.type),
|
|
417
|
+
status: H(t.status)
|
|
410
418
|
} }, n, "Unable to schedule interview");
|
|
411
|
-
e((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:
|
|
419
|
-
...n.status ? { 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 ?
|
|
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
|
|
437
|
+
throw U("Invoices", "global-billing-svc");
|
|
430
438
|
},
|
|
431
439
|
updateInvoice: async () => {
|
|
432
|
-
throw
|
|
440
|
+
throw U("Invoices", "global-billing-svc");
|
|
433
441
|
},
|
|
434
442
|
removeInvoice: async () => {
|
|
435
|
-
throw
|
|
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:
|
|
448
|
+
status: H(t.status)
|
|
441
449
|
} }, n, "Unable to create vendor");
|
|
442
|
-
e((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:
|
|
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 ?
|
|
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(
|
|
467
|
+
let n = $.getState().initParams, r = await Z(ee, { input: {
|
|
460
468
|
...t,
|
|
461
|
-
status:
|
|
469
|
+
status: H(t.status)
|
|
462
470
|
} }, n, "Unable to create client");
|
|
463
|
-
e((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(
|
|
474
|
+
let r = $.getState().initParams, i = await Z(te, {
|
|
467
475
|
id: t,
|
|
468
476
|
input: {
|
|
469
477
|
...n,
|
|
470
|
-
...n.status ? { 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 ?
|
|
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(
|
|
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(
|
|
481
|
-
e((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(
|
|
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 ?
|
|
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(
|
|
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(
|
|
503
|
+
let n = $.getState().initParams, r = await Z(oe, { input: {
|
|
496
504
|
...t,
|
|
497
|
-
status:
|
|
498
|
-
priority:
|
|
505
|
+
status: H(t.status),
|
|
506
|
+
priority: H(t.priority)
|
|
499
507
|
} }, n, "Unable to create project");
|
|
500
|
-
e((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(
|
|
511
|
+
let r = $.getState().initParams, i = await Z(se, {
|
|
504
512
|
id: t,
|
|
505
513
|
input: {
|
|
506
514
|
...n,
|
|
507
|
-
...n.status ? { status:
|
|
508
|
-
...n.priority ? { 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 ?
|
|
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(
|
|
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
|
|
526
|
+
throw U("Marketplace services", "global-store-svc");
|
|
519
527
|
},
|
|
520
528
|
updateMarketplaceService: async () => {
|
|
521
|
-
throw
|
|
529
|
+
throw U("Marketplace services", "global-store-svc");
|
|
522
530
|
},
|
|
523
531
|
removeMarketplaceService: async () => {
|
|
524
|
-
throw
|
|
532
|
+
throw U("Marketplace services", "global-store-svc");
|
|
525
533
|
},
|
|
526
534
|
addDepartment: async (t) => {
|
|
527
|
-
let n = $.getState().initParams, r = await Z(
|
|
528
|
-
e((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(
|
|
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 ?
|
|
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(
|
|
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
|
|
550
|
+
throw U("Courses", "wspace-learning-svc");
|
|
543
551
|
},
|
|
544
552
|
updateCourse: async () => {
|
|
545
|
-
throw
|
|
553
|
+
throw U("Courses", "wspace-learning-svc");
|
|
546
554
|
},
|
|
547
555
|
removeCourse: async () => {
|
|
548
|
-
throw
|
|
556
|
+
throw U("Courses", "wspace-learning-svc");
|
|
549
557
|
},
|
|
550
558
|
enrollCourse: async () => {
|
|
551
|
-
throw
|
|
559
|
+
throw U("Course enrollment", "wspace-learning-svc");
|
|
552
560
|
},
|
|
553
561
|
addLearningPath: async () => {
|
|
554
|
-
throw
|
|
562
|
+
throw U("Learning paths", "wspace-learning-svc");
|
|
555
563
|
},
|
|
556
564
|
updateLearningPath: async () => {
|
|
557
|
-
throw
|
|
565
|
+
throw U("Learning paths", "wspace-learning-svc");
|
|
558
566
|
},
|
|
559
567
|
removeLearningPath: async () => {
|
|
560
|
-
throw
|
|
568
|
+
throw U("Learning paths", "wspace-learning-svc");
|
|
561
569
|
},
|
|
562
570
|
addPayrollRecord: async (t) => {
|
|
563
|
-
let n = $.getState().initParams, r = await Z(
|
|
571
|
+
let n = $.getState().initParams, r = await Z(fe, { input: {
|
|
564
572
|
...t,
|
|
565
|
-
status:
|
|
573
|
+
status: H(t.status)
|
|
566
574
|
} }, n, "Unable to create payroll record");
|
|
567
|
-
e((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(
|
|
578
|
+
let r = $.getState().initParams, i = await Z(T, {
|
|
571
579
|
id: t,
|
|
572
580
|
input: {
|
|
573
581
|
...n,
|
|
574
|
-
...n.status ? { 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 ?
|
|
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(
|
|
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(
|
|
585
|
-
e((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(
|
|
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 ?
|
|
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(
|
|
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
|