@burdenoff/microfe-crewfoundry 2026.703.1 → 2026.703.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -69,18 +69,50 @@ var n = "\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n emp
|
|
|
69
69
|
if (e.errors?.length) throw Error(e.errors[0]?.message || t);
|
|
70
70
|
if (!e.data) throw Error(t);
|
|
71
71
|
return e.data;
|
|
72
|
+
}, xe = new Set([
|
|
73
|
+
"id",
|
|
74
|
+
"createdAt",
|
|
75
|
+
"createdOn",
|
|
76
|
+
"updatedAt",
|
|
77
|
+
"deletedAt",
|
|
78
|
+
"employeeCount",
|
|
79
|
+
"memberCount",
|
|
80
|
+
"projectCount",
|
|
81
|
+
"enrolled",
|
|
82
|
+
"completed",
|
|
83
|
+
"completionRate",
|
|
84
|
+
"reviews",
|
|
85
|
+
"rating",
|
|
86
|
+
"tasks",
|
|
87
|
+
"completedTasks",
|
|
88
|
+
"spent",
|
|
89
|
+
"progress",
|
|
90
|
+
"applicants",
|
|
91
|
+
"viewCount",
|
|
92
|
+
"revenue",
|
|
93
|
+
"projects"
|
|
94
|
+
]), Se = (e) => {
|
|
95
|
+
if (!e) return e;
|
|
96
|
+
let t = e.input;
|
|
97
|
+
if (!t || typeof t != "object" || Array.isArray(t)) return e;
|
|
98
|
+
let n = {};
|
|
99
|
+
for (let [e, r] of Object.entries(t)) xe.has(e) || (n[e] = r);
|
|
100
|
+
return {
|
|
101
|
+
...e,
|
|
102
|
+
input: n
|
|
103
|
+
};
|
|
72
104
|
}, Z = async (e, n, r, i, a = "workspace") => be(await t({
|
|
73
105
|
gateway: a,
|
|
74
106
|
query: e,
|
|
75
|
-
variables: n,
|
|
107
|
+
variables: Se(n),
|
|
76
108
|
authToken: r.authToken,
|
|
77
109
|
baseUrl: a === "workspace" ? r.apiGatewayUrl : void 0,
|
|
78
110
|
extraHeaders: { ...a === "workspace" && r.workspaceId ? { "x-workspace-id": r.workspaceId } : {} }
|
|
79
|
-
}), i),
|
|
111
|
+
}), i), Ce = () => !1, Q = async (e, t, n, r, i = "workspace") => {
|
|
80
112
|
try {
|
|
81
113
|
return await Z(e, t, n, r, i);
|
|
82
114
|
} catch (e) {
|
|
83
|
-
return
|
|
115
|
+
return Ce() && console.warn(`[crewfoundry] overlap query skipped: ${r}`, e), null;
|
|
84
116
|
}
|
|
85
117
|
}, $ = e((e) => ({
|
|
86
118
|
metrics: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crewfoundryStore.js","names":[],"sources":["../../../src/crewfoundry/store/crewfoundryStore.ts"],"sourcesContent":["import { create } from 'zustand';\nimport type { OverviewMetric, WorkItem } from '../types';\n\n// ── Domain Types ────────────────────────────────────────────────\nexport interface Employee {\n id: string;\n firstName: string;\n lastName: string;\n email: string;\n department: string;\n position: string;\n status: 'active' | 'inactive' | 'on_leave' | 'terminated';\n type: 'full_time' | 'part_time' | 'contract' | 'intern';\n salary: number;\n startDate: string;\n avatar?: string;\n location: string;\n managerId?: string;\n phone: string;\n performanceScore: number;\n}\n\nexport interface Department {\n id: string;\n name: string;\n headId: string;\n headName: string;\n employeeCount: number;\n budget: number;\n location: string;\n status: 'active' | 'restructuring';\n}\n\nexport interface JobPosting {\n id: string;\n title: string;\n department: string;\n location: string;\n type: 'full_time' | 'part_time' | 'contract' | 'remote';\n experienceLevel: 'entry' | 'mid' | 'senior' | 'lead' | 'executive';\n salaryMin: number;\n salaryMax: number;\n status: 'draft' | 'active' | 'paused' | 'closed' | 'filled';\n applicants: number;\n postedDate: string;\n deadline: string;\n description: string;\n requirements: string[];\n benefits: string[];\n}\n\nexport interface Candidate {\n id: string;\n firstName: string;\n lastName: string;\n email: string;\n phone: string;\n position: string;\n status: 'new' | 'screening' | 'interview' | 'assessment' | 'offer' | 'hired' | 'rejected';\n appliedDate: string;\n resumeUrl?: string;\n rating: number;\n source: string;\n experience: number;\n skills: string[];\n currentCompany: string;\n notes: string;\n}\n\nexport interface Interview {\n id: string;\n candidateId: string;\n candidateName: string;\n position: string;\n interviewerName: string;\n date: string;\n time: string;\n type: 'phone' | 'video' | 'onsite' | 'panel' | 'technical';\n status: 'scheduled' | 'completed' | 'cancelled' | 'no_show';\n feedback?: string;\n rating?: number;\n}\n\nexport interface LearningCourse {\n id: string;\n title: string;\n category: string;\n instructor: string;\n duration: string;\n level: 'beginner' | 'intermediate' | 'advanced';\n enrolled: number;\n completed: number;\n rating: number;\n status: 'active' | 'draft' | 'archived';\n thumbnail?: string;\n description: string;\n modules: number;\n skills: string[];\n}\n\nexport interface LearningPath {\n id: string;\n title: string;\n description: string;\n courses: string[];\n duration: string;\n level: string;\n enrolled: number;\n completionRate: number;\n}\n\nexport interface MarketplaceService {\n id: string;\n title: string;\n provider: string;\n category: string;\n price: number;\n priceType: 'hourly' | 'fixed' | 'monthly';\n rating: number;\n reviews: number;\n description: string;\n deliveryTime: string;\n status: 'active' | 'paused' | 'pending';\n skills: string[];\n}\n\nexport interface Announcement {\n id: string;\n title: string;\n content: string;\n author: string;\n authorRole: string;\n category: 'general' | 'hr' | 'it' | 'emergency' | 'event';\n priority: 'low' | 'medium' | 'high' | 'urgent';\n isPinned: boolean;\n createdAt: string;\n viewCount: number;\n tags: string[];\n}\n\nexport interface Team {\n id: string;\n name: string;\n description: string;\n leadId: string;\n leadName: string;\n members: string[];\n memberCount: number;\n department: string;\n status: 'active' | 'forming' | 'disbanded';\n projectCount: number;\n createdAt: string;\n}\n\nexport interface Project {\n id: string;\n name: string;\n description: string;\n status: 'planning' | 'active' | 'on_hold' | 'completed' | 'cancelled';\n priority: 'low' | 'medium' | 'high' | 'critical';\n startDate: string;\n endDate: string;\n progress: number;\n budget: number;\n spent: number;\n teamId: string;\n teamName: string;\n managerId: string;\n managerName: string;\n tasks: number;\n completedTasks: number;\n}\n\nexport interface PayrollRecord {\n id: string;\n employeeId: string;\n employeeName: string;\n department: string;\n period: string;\n grossPay: number;\n deductions: number;\n netPay: number;\n status: 'draft' | 'processing' | 'approved' | 'paid' | 'failed';\n payDate: string;\n paymentMethod: string;\n}\n\nexport interface LeaveRequest {\n id: string;\n employeeId: string;\n employeeName: string;\n department: string;\n type: 'annual' | 'sick' | 'personal' | 'maternity' | 'paternity' | 'unpaid';\n startDate: string;\n endDate: string;\n days: number;\n status: 'pending' | 'approved' | 'rejected' | 'cancelled';\n reason: string;\n approverName?: string;\n}\n\nexport interface TimeEntry {\n id: string;\n employeeId: string;\n employeeName: string;\n date: string;\n clockIn: string;\n clockOut: string;\n totalHours: number;\n overtime: number;\n project: string;\n status: 'pending' | 'approved' | 'rejected';\n}\n\nexport interface Notification {\n id: string;\n title: string;\n message: string;\n type: 'info' | 'success' | 'warning' | 'error';\n category: string;\n read: boolean;\n createdAt: string;\n actionUrl?: string;\n}\n\nexport interface Invoice {\n id: string;\n number: string;\n clientName: string;\n amount: number;\n status: 'draft' | 'sent' | 'paid' | 'overdue' | 'cancelled';\n issueDate: string;\n dueDate: string;\n items: { description: string; amount: number }[];\n}\n\nexport interface Vendor {\n id: string;\n name: string;\n category: string;\n contactPerson: string;\n email: string;\n phone: string;\n status: 'active' | 'inactive' | 'pending';\n contractValue: number;\n rating: number;\n}\n\nexport interface Client {\n id: string;\n name: string;\n industry: string;\n contactPerson: string;\n email: string;\n phone: string;\n status: 'active' | 'prospect' | 'churned';\n revenue: number;\n projects: number;\n since: string;\n}\n\nexport interface ExternalPaymentMethod {\n id: string;\n type: 'bank' | 'card';\n name: string;\n bank: string;\n last4: string;\n status: 'primary' | 'active';\n expiry?: string;\n}\n\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\nimport type { Gateway } from '@burdenoff/fe-libs/shared/config';\n\ntype InitParams = {\n workspaceId?: string;\n authToken?: string;\n apiGatewayUrl?: string;\n actorId?: string;\n};\n\ntype GraphqlResult<T> = {\n data: T | null;\n errors?: Array<{ message: string }>;\n};\n\nconst BOOTSTRAP_QUERY = `\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n employees { id firstName lastName email department position status type salary startDate avatar location managerId phone performanceScore }\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 }\n interviews { id candidateId candidateName position interviewerName date time type status feedback rating }\n courses { id title category instructor duration level enrolled completed rating status thumbnail description modules skills }\n learningPaths { id title description courses duration level enrolled completionRate }\n marketplaceServices { id title provider category price priceType rating reviews description deliveryTime status skills }\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 }\n notifications { id title message type category read createdAt actionUrl }\n invoices { id number clientName amount status issueDate dueDate items }\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`;\n\nconst WORKSPACE_BOOTSTRAP_WITH_OVERLAP_QUERY = `\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 }\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 }\n interviews { id candidateId candidateName position interviewerName date time type status feedback rating }\n courses { id title category instructor duration level enrolled completed rating status thumbnail description modules skills }\n learningPaths { id title description courses duration level enrolled completionRate }\n marketplaceServices { id title provider category price priceType rating reviews description deliveryTime status skills }\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 }\n notifications { id title message type category read createdAt actionUrl }\n invoices { id number clientName amount status issueDate dueDate items }\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`;\n\nconst OVERLAP_BILLING_QUERY = `\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`;\n\nconst CREATE_EMPLOYEE_MUTATION = `mutation CreateCrewEmployee($input: CreateCrewEmployeeInput!) { createCrewEmployee(input: $input) { id firstName lastName email department position status type salary startDate avatar location managerId phone performanceScore } }`;\nconst UPDATE_EMPLOYEE_MUTATION = `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 } }`;\nconst REMOVE_EMPLOYEE_MUTATION = `mutation RemoveCrewEmployee($id: ID!) { removeCrewEmployee(id: $id) }`;\nconst CREATE_JOB_MUTATION = `mutation CreateCrewJobPosting($input: CreateCrewJobPostingInput!) { createCrewJobPosting(input: $input) { id title department location type experienceLevel salaryMin salaryMax status applicants postedDate deadline description requirements benefits } }`;\nconst UPDATE_JOB_MUTATION = `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 } }`;\nconst CREATE_CANDIDATE_MUTATION = `mutation CreateCrewCandidate($input: CreateCrewCandidateInput!) { createCrewCandidate(input: $input) { id firstName lastName email phone position status appliedDate resumeUrl rating source experience skills currentCompany notes } }`;\nconst UPDATE_CANDIDATE_MUTATION = `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 } }`;\nconst CREATE_ANNOUNCEMENT_MUTATION = `mutation CreateCrewAnnouncement($input: CreateCrewAnnouncementInput!) { createCrewAnnouncement(input: $input) { id title content author authorRole category priority isPinned createdAt viewCount tags } }`;\nconst CREATE_LEAVE_MUTATION = `mutation CreateCrewLeaveRequest($input: CreateCrewLeaveRequestInput!) { createCrewLeaveRequest(input: $input) { id employeeId employeeName department type startDate endDate days status reason approverName } }`;\nconst UPDATE_LEAVE_MUTATION = `mutation UpdateCrewLeaveRequest($id: ID!, $input: UpdateCrewLeaveRequestInput!) { updateCrewLeaveRequest(id: $id, input: $input) { id employeeId employeeName department type startDate endDate days status reason approverName } }`;\nconst MARK_NOTIFICATION_MUTATION = `mutation MarkCrewNotificationRead($id: ID!) { markCrewNotificationRead(id: $id) }`;\nconst MARK_ALL_NOTIFICATIONS_MUTATION = `mutation MarkAllCrewNotificationsRead { markAllCrewNotificationsRead }`;\n\n// Extra removes / updates for existing entities (delete + edit buttons).\nconst REMOVE_JOB_MUTATION = `mutation RemoveCrewJobPosting($id: ID!) { removeCrewJobPosting(id: $id) }`;\nconst REMOVE_CANDIDATE_MUTATION = `mutation RemoveCrewCandidate($id: ID!) { removeCrewCandidate(id: $id) }`;\nconst UPDATE_ANNOUNCEMENT_MUTATION = `mutation UpdateCrewAnnouncement($id: ID!, $input: UpdateCrewAnnouncementInput!) { updateCrewAnnouncement(id: $id, input: $input) { id title content author authorRole category priority isPinned createdAt viewCount tags } }`;\nconst REMOVE_ANNOUNCEMENT_MUTATION = `mutation RemoveCrewAnnouncement($id: ID!) { removeCrewAnnouncement(id: $id) }`;\n\n// Interview\nconst CREATE_INTERVIEW_MUTATION = `mutation CreateCrewInterview($input: CreateCrewInterviewInput!) { createCrewInterview(input: $input) { id candidateId candidateName position interviewerName date time type status feedback rating } }`;\nconst UPDATE_INTERVIEW_MUTATION = `mutation UpdateCrewInterview($id: ID!, $input: UpdateCrewInterviewInput!) { updateCrewInterview(id: $id, input: $input) { id candidateId candidateName position interviewerName date time type status feedback rating } }`;\nconst REMOVE_INTERVIEW_MUTATION = `mutation RemoveCrewInterview($id: ID!) { removeCrewInterview(id: $id) }`;\n\n// Invoice\nconst CREATE_INVOICE_MUTATION = `mutation CreateCrewInvoice($input: CreateCrewInvoiceInput!) { createCrewInvoice(input: $input) { id number clientName amount status issueDate dueDate items } }`;\nconst UPDATE_INVOICE_MUTATION = `mutation UpdateCrewInvoice($id: ID!, $input: UpdateCrewInvoiceInput!) { updateCrewInvoice(id: $id, input: $input) { id number clientName amount status issueDate dueDate items } }`;\nconst REMOVE_INVOICE_MUTATION = `mutation RemoveCrewInvoice($id: ID!) { removeCrewInvoice(id: $id) }`;\n\n// Vendor\nconst CREATE_VENDOR_MUTATION = `mutation CreateCrewVendor($input: CreateCrewVendorInput!) { createCrewVendor(input: $input) { id name category contactPerson email phone status contractValue rating } }`;\nconst UPDATE_VENDOR_MUTATION = `mutation UpdateCrewVendor($id: ID!, $input: UpdateCrewVendorInput!) { updateCrewVendor(id: $id, input: $input) { id name category contactPerson email phone status contractValue rating } }`;\nconst REMOVE_VENDOR_MUTATION = `mutation RemoveCrewVendor($id: ID!) { removeCrewVendor(id: $id) }`;\n\n// Client\nconst CREATE_CLIENT_MUTATION = `mutation CreateCrewClient($input: CreateCrewClientInput!) { createCrewClient(input: $input) { id name industry contactPerson email phone status revenue projects since } }`;\nconst UPDATE_CLIENT_MUTATION = `mutation UpdateCrewClient($id: ID!, $input: UpdateCrewClientInput!) { updateCrewClient(id: $id, input: $input) { id name industry contactPerson email phone status revenue projects since } }`;\nconst REMOVE_CLIENT_MUTATION = `mutation RemoveCrewClient($id: ID!) { removeCrewClient(id: $id) }`;\n\n// Team\nconst CREATE_TEAM_MUTATION = `mutation CreateCrewTeam($input: CreateCrewTeamInput!) { createCrewTeam(input: $input) { id name description leadId leadName members memberCount department status projectCount createdAt } }`;\nconst UPDATE_TEAM_MUTATION = `mutation UpdateCrewTeam($id: ID!, $input: UpdateCrewTeamInput!) { updateCrewTeam(id: $id, input: $input) { id name description leadId leadName members memberCount department status projectCount createdAt } }`;\nconst REMOVE_TEAM_MUTATION = `mutation RemoveCrewTeam($id: ID!) { removeCrewTeam(id: $id) }`;\n\n// Project\nconst CREATE_PROJECT_MUTATION = `mutation CreateCrewProject($input: CreateCrewProjectInput!) { createCrewProject(input: $input) { id name description status priority startDate endDate progress budget spent teamId teamName managerId managerName tasks completedTasks } }`;\nconst UPDATE_PROJECT_MUTATION = `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 } }`;\nconst REMOVE_PROJECT_MUTATION = `mutation RemoveCrewProject($id: ID!) { removeCrewProject(id: $id) }`;\n\n// MarketplaceService\nconst CREATE_MARKETPLACE_SERVICE_MUTATION = `mutation CreateCrewMarketplaceService($input: CreateCrewMarketplaceServiceInput!) { createCrewMarketplaceService(input: $input) { id title provider category price priceType rating reviews description deliveryTime status skills } }`;\nconst UPDATE_MARKETPLACE_SERVICE_MUTATION = `mutation UpdateCrewMarketplaceService($id: ID!, $input: UpdateCrewMarketplaceServiceInput!) { updateCrewMarketplaceService(id: $id, input: $input) { id title provider category price priceType rating reviews description deliveryTime status skills } }`;\nconst REMOVE_MARKETPLACE_SERVICE_MUTATION = `mutation RemoveCrewMarketplaceService($id: ID!) { removeCrewMarketplaceService(id: $id) }`;\n\n// Department\nconst CREATE_DEPARTMENT_MUTATION = `mutation CreateCrewDepartment($input: CreateCrewDepartmentInput!) { createCrewDepartment(input: $input) { id name headId headName employeeCount budget location status } }`;\nconst UPDATE_DEPARTMENT_MUTATION = `mutation UpdateCrewDepartment($id: ID!, $input: UpdateCrewDepartmentInput!) { updateCrewDepartment(id: $id, input: $input) { id name headId headName employeeCount budget location status } }`;\nconst REMOVE_DEPARTMENT_MUTATION = `mutation RemoveCrewDepartment($id: ID!) { removeCrewDepartment(id: $id) }`;\n\n// Course (LearningCourse) + enroll\nconst COURSE_FIELDS = `id title category instructor duration level enrolled completed rating status thumbnail description modules skills`;\nconst CREATE_COURSE_MUTATION = `mutation CreateCrewCourse($input: CreateCrewCourseInput!) { createCrewCourse(input: $input) { ${COURSE_FIELDS} } }`;\nconst UPDATE_COURSE_MUTATION = `mutation UpdateCrewCourse($id: ID!, $input: UpdateCrewCourseInput!) { updateCrewCourse(id: $id, input: $input) { ${COURSE_FIELDS} } }`;\nconst REMOVE_COURSE_MUTATION = `mutation RemoveCrewCourse($id: ID!) { removeCrewCourse(id: $id) }`;\nconst ENROLL_COURSE_MUTATION = `mutation EnrollCrewCourse($id: ID!) { enrollCrewCourse(id: $id) { ${COURSE_FIELDS} } }`;\n\n// LearningPath\nconst CREATE_LEARNING_PATH_MUTATION = `mutation CreateCrewLearningPath($input: CreateCrewLearningPathInput!) { createCrewLearningPath(input: $input) { id title description courses duration level enrolled completionRate } }`;\nconst UPDATE_LEARNING_PATH_MUTATION = `mutation UpdateCrewLearningPath($id: ID!, $input: UpdateCrewLearningPathInput!) { updateCrewLearningPath(id: $id, input: $input) { id title description courses duration level enrolled completionRate } }`;\nconst REMOVE_LEARNING_PATH_MUTATION = `mutation RemoveCrewLearningPath($id: ID!) { removeCrewLearningPath(id: $id) }`;\n\n// PayrollRecord\nconst CREATE_PAYROLL_MUTATION = `mutation CreateCrewPayrollRecord($input: CreateCrewPayrollRecordInput!) { createCrewPayrollRecord(input: $input) { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod } }`;\nconst UPDATE_PAYROLL_MUTATION = `mutation UpdateCrewPayrollRecord($id: ID!, $input: UpdateCrewPayrollRecordInput!) { updateCrewPayrollRecord(id: $id, input: $input) { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod } }`;\nconst REMOVE_PAYROLL_MUTATION = `mutation RemoveCrewPayrollRecord($id: ID!) { removeCrewPayrollRecord(id: $id) }`;\n\n// TimeEntry\nconst CREATE_TIME_ENTRY_MUTATION = `mutation CreateCrewTimeEntry($input: CreateCrewTimeEntryInput!) { createCrewTimeEntry(input: $input) { id employeeId employeeName date clockIn clockOut totalHours overtime project status } }`;\nconst UPDATE_TIME_ENTRY_MUTATION = `mutation UpdateCrewTimeEntry($id: ID!, $input: UpdateCrewTimeEntryInput!) { updateCrewTimeEntry(id: $id, input: $input) { id employeeId employeeName date clockIn clockOut totalHours overtime project status } }`;\nconst REMOVE_TIME_ENTRY_MUTATION = `mutation RemoveCrewTimeEntry($id: ID!) { removeCrewTimeEntry(id: $id) }`;\n\nconst normalizeStatus = (value: string) => value.toUpperCase().replaceAll('-', '_');\n\nconst toDateOnly = (value?: string | null) => (value ? value.slice(0, 10) : 'TBD');\n\nconst asRecord = (value: unknown): Record<string, unknown> | null => {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return null;\n }\n return value as Record<string, unknown>;\n};\n\nconst asNumber = (value: unknown): number | null => (typeof value === 'number' ? value : null);\n\nconst asString = (value: unknown): string | null => (typeof value === 'string' ? value : null);\n\nconst mapProjectStatus = (value: string): Project['status'] => {\n const status = value.toLowerCase();\n if (status === 'active') return 'active';\n if (status === 'completed') return 'completed';\n if (status === 'cancelled') return 'cancelled';\n if (status === 'archived') return 'on_hold';\n return 'planning';\n};\n\nconst mapGroupStatus = (value: string): Team['status'] => {\n const status = value.toLowerCase();\n if (status === 'active') return 'active';\n if (status === 'inactive' || status === 'archived' || status === 'deleted') return 'disbanded';\n return 'forming';\n};\n\ntype OverlapWorkspaceResponse = {\n projects: {\n items: Array<{\n id: string;\n name: string;\n key: string;\n creatorId: string;\n status: string;\n config?: unknown;\n archived: boolean;\n createdAt: string;\n updatedAt: string;\n }>;\n };\n groups: {\n edges: Array<{\n node: {\n id: string;\n name: string;\n description?: string | null;\n groupType?: string | null;\n status: string;\n memberCount: number;\n ownerId: string;\n createdAt: string;\n };\n }>;\n };\n conversations: {\n edges: Array<{\n node: {\n id: string;\n title?: string | null;\n description?: string | null;\n state: string;\n unreadCount: number;\n memberCount: number;\n updatedAt: string;\n };\n }>;\n };\n};\n\ntype WorkspaceBootstrapWithOverlapResponse = BootstrapPayload & OverlapWorkspaceResponse;\n\ntype OverlapBillingResponse = {\n getBillingAccountsByOrg: Array<{\n id?: string | null;\n name?: string | null;\n isDefault?: boolean | null;\n paymentMethods?: Array<{\n id: string;\n type: string;\n brand?: string | null;\n last4?: string | null;\n isDefault: boolean;\n expiryMonth?: number | null;\n expiryYear?: number | null;\n } | null> | null;\n }>;\n};\n\ntype BootstrapPayload = {\n crewfoundryBootstrap: {\n employees: Employee[];\n departments: Department[];\n jobPostings: JobPosting[];\n candidates: Candidate[];\n interviews: Interview[];\n courses: LearningCourse[];\n learningPaths: LearningPath[];\n marketplaceServices: MarketplaceService[];\n announcements: Announcement[];\n teams: Team[];\n projects: Project[];\n payrollRecords: PayrollRecord[];\n leaveRequests: LeaveRequest[];\n timeEntries: TimeEntry[];\n notifications: Notification[];\n invoices: Invoice[];\n vendors: Vendor[];\n clients: Client[];\n };\n};\n\nconst mapOverlapProjects = (\n projects: OverlapWorkspaceResponse['projects']['items'],\n teams: Team[]\n) =>\n projects.map((project, index): Project => {\n const config = asRecord(project.config);\n const budget = asNumber(config?.budget) ?? 25000 + index * 2500;\n const spent =\n asNumber(config?.spent) ?? Math.round(budget * (project.status === 'COMPLETED' ? 1 : 0.62));\n const progress = asNumber(config?.progress) ?? (project.status === 'COMPLETED' ? 100 : 58);\n const tasks = asNumber(config?.tasks) ?? 20 + (index % 9);\n const completedTasks = asNumber(config?.completedTasks) ?? Math.round((progress / 100) * tasks);\n const team = teams[index % Math.max(teams.length, 1)];\n\n return {\n id: project.id,\n name: project.name,\n description: asString(config?.description) || `${project.key} delivery plan`,\n status: mapProjectStatus(project.status),\n priority: (asString(config?.priority)?.toLowerCase() as Project['priority']) || 'medium',\n startDate: toDateOnly(project.createdAt),\n endDate: toDateOnly(project.updatedAt),\n progress,\n budget,\n spent,\n teamId: team?.id || 'unassigned',\n teamName: team?.name || 'Unassigned Team',\n managerId: project.creatorId,\n managerName: `Lead ${project.creatorId.slice(0, 8)}`,\n tasks,\n completedTasks,\n };\n });\n\nconst mapOverlapTeams = (groups: OverlapWorkspaceResponse['groups']['edges']): Team[] =>\n groups.map(({ node }) => ({\n id: node.id,\n name: node.name,\n description: node.description || `${node.name} team workspace`,\n leadId: node.ownerId,\n leadName: `Lead ${node.ownerId.slice(0, 8)}`,\n members: [],\n memberCount: node.memberCount,\n department: node.groupType?.toLowerCase().replaceAll('_', ' ') || 'operations',\n status: mapGroupStatus(node.status),\n projectCount: 0,\n createdAt: toDateOnly(node.createdAt),\n }));\n\nconst mapConversationNotifications = (\n conversations: OverlapWorkspaceResponse['conversations']['edges']\n): Notification[] =>\n conversations\n .filter(({ node }) => node.unreadCount > 0)\n .map(({ node }) => ({\n id: `conversation-${node.id}`,\n title: node.title || 'Conversation update',\n message: `${node.unreadCount} unread in ${node.memberCount}-member channel`,\n type: node.state.toLowerCase() === 'active' ? 'info' : 'warning',\n category: 'communications',\n read: false,\n createdAt: node.updatedAt,\n actionUrl: `/crewfoundry/communications/messages-page`,\n }));\n\nconst mergeNotifications = (base: Notification[], overlap: Notification[]) => {\n const ids = new Set(base.map((item) => item.id));\n const newItems = overlap.filter((item) => !ids.has(item.id));\n return [...newItems, ...base];\n};\n\nconst mapBillingMethods = (data: OverlapBillingResponse): ExternalPaymentMethod[] => {\n const account =\n data.getBillingAccountsByOrg.find((item) => item?.isDefault && item?.id) ||\n data.getBillingAccountsByOrg.find((item) => item?.id);\n\n if (!account?.id) {\n return [];\n }\n\n return (account.paymentMethods || [])\n .filter((item): item is NonNullable<typeof item> => Boolean(item))\n .map((method) => {\n const month = method.expiryMonth ? String(method.expiryMonth).padStart(2, '0') : undefined;\n const year = method.expiryYear ? String(method.expiryYear) : undefined;\n const isBank = method.type === 'BANK_TRANSFER' || method.type === 'NETBANKING';\n\n return {\n id: method.id,\n type: isBank ? 'bank' : 'card',\n name: `${account.name || 'Billing'} ${isBank ? 'Bank Account' : 'Card'}`,\n bank: method.brand || account.name || 'Billing Account',\n last4: method.last4 || '0000',\n status: method.isDefault ? 'primary' : 'active',\n expiry: month && year ? `${month}/${year}` : undefined,\n };\n });\n};\n\nconst parseGraphql = <T>(result: GraphqlResult<T>, fallbackMessage: string): T => {\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || fallbackMessage);\n }\n if (!result.data) {\n throw new Error(fallbackMessage);\n }\n return result.data;\n};\n\nconst runGraphql = async <T>(\n query: string,\n variables: Record<string, unknown> | undefined,\n params: InitParams,\n fallbackMessage: string,\n gateway: Gateway = 'workspace'\n) => {\n const result = await graphqlFetch<T>({\n gateway,\n query,\n variables,\n authToken: params.authToken,\n // `apiGatewayUrl` is the workspace gateway base (dev override only). The\n // global gateway (e.g. billing overlap) resolves its own URL from fe-libs\n // config, so never force the workspace base onto a global-gateway call.\n baseUrl: gateway === 'workspace' ? params.apiGatewayUrl : undefined,\n extraHeaders: {\n ...(gateway === 'workspace' && params.workspaceId\n ? { 'x-workspace-id': params.workspaceId }\n : {}),\n },\n });\n return parseGraphql(result as GraphqlResult<T>, fallbackMessage);\n};\n\n// Overlap queries are best-effort: they enrich the crew bootstrap with real\n// wspace/global platform data but must never block the page if a field is\n// unavailable in a given environment. Swallow to null, but surface the reason\n// in dev so schema-arg drift (the historical failure mode) is visible.\n// Vite injects `import.meta.env.DEV`, but this package's tsconfig does not pull\n// in `vite/client` ambient types — narrow through a typed shape instead of `any`.\nconst isDevEnv = (): boolean =>\n Boolean((import.meta as { env?: { DEV?: boolean } }).env?.DEV);\n\nconst runOverlap = async <T>(\n query: string,\n variables: Record<string, unknown> | undefined,\n params: InitParams,\n fallbackMessage: string,\n gateway: Gateway = 'workspace'\n): Promise<T | null> => {\n try {\n return await runGraphql<T>(query, variables, params, fallbackMessage, gateway);\n } catch (error) {\n if (isDevEnv()) {\n console.warn(`[crewfoundry] overlap query skipped: ${fallbackMessage}`, error);\n }\n return null;\n }\n};\n\n// ── Store Interface ─────────────────────────────────────────────\ninterface CrewFoundryState {\n // Overview\n metrics: OverviewMetric[];\n workItems: WorkItem[];\n selectedView: string;\n\n // Domain data\n employees: Employee[];\n departments: Department[];\n jobPostings: JobPosting[];\n candidates: Candidate[];\n interviews: Interview[];\n courses: LearningCourse[];\n learningPaths: LearningPath[];\n marketplaceServices: MarketplaceService[];\n announcements: Announcement[];\n teams: Team[];\n projects: Project[];\n payrollRecords: PayrollRecord[];\n leaveRequests: LeaveRequest[];\n timeEntries: TimeEntry[];\n notifications: Notification[];\n paymentMethods: ExternalPaymentMethod[];\n invoices: Invoice[];\n vendors: Vendor[];\n clients: Client[];\n\n // Actions\n initialized: boolean;\n loading: boolean;\n error: string | null;\n initParams: InitParams;\n initializeData: (params: InitParams) => Promise<void>;\n setSelectedView: (view: string) => void;\n setWorkItems: (items: WorkItem[]) => void;\n addEmployee: (employee: Employee) => Promise<void>;\n updateEmployee: (id: string, updates: Partial<Employee>) => Promise<void>;\n removeEmployee: (id: string) => Promise<void>;\n addJobPosting: (job: JobPosting) => Promise<void>;\n updateJobPosting: (id: string, updates: Partial<JobPosting>) => Promise<void>;\n addCandidate: (candidate: Candidate) => Promise<void>;\n updateCandidate: (id: string, updates: Partial<Candidate>) => Promise<void>;\n removeJobPosting: (id: string) => Promise<void>;\n removeCandidate: (id: string) => Promise<void>;\n addAnnouncement: (announcement: Announcement) => Promise<void>;\n updateAnnouncement: (id: string, updates: Partial<Announcement>) => Promise<void>;\n removeAnnouncement: (id: string) => Promise<void>;\n addLeaveRequest: (request: LeaveRequest) => Promise<void>;\n updateLeaveRequest: (id: string, updates: Partial<LeaveRequest>) => Promise<void>;\n addInterview: (interview: Interview) => Promise<void>;\n updateInterview: (id: string, updates: Partial<Interview>) => Promise<void>;\n removeInterview: (id: string) => Promise<void>;\n addInvoice: (invoice: Invoice) => Promise<void>;\n updateInvoice: (id: string, updates: Partial<Invoice>) => Promise<void>;\n removeInvoice: (id: string) => Promise<void>;\n addVendor: (vendor: Vendor) => Promise<void>;\n updateVendor: (id: string, updates: Partial<Vendor>) => Promise<void>;\n removeVendor: (id: string) => Promise<void>;\n addClient: (client: Client) => Promise<void>;\n updateClient: (id: string, updates: Partial<Client>) => Promise<void>;\n removeClient: (id: string) => Promise<void>;\n addTeam: (team: Team) => Promise<void>;\n updateTeam: (id: string, updates: Partial<Team>) => Promise<void>;\n removeTeam: (id: string) => Promise<void>;\n addProject: (project: Project) => Promise<void>;\n updateProject: (id: string, updates: Partial<Project>) => Promise<void>;\n removeProject: (id: string) => Promise<void>;\n addMarketplaceService: (service: MarketplaceService) => Promise<void>;\n updateMarketplaceService: (id: string, updates: Partial<MarketplaceService>) => Promise<void>;\n removeMarketplaceService: (id: string) => Promise<void>;\n addDepartment: (department: Department) => Promise<void>;\n updateDepartment: (id: string, updates: Partial<Department>) => Promise<void>;\n removeDepartment: (id: string) => Promise<void>;\n addCourse: (course: LearningCourse) => Promise<void>;\n updateCourse: (id: string, updates: Partial<LearningCourse>) => Promise<void>;\n removeCourse: (id: string) => Promise<void>;\n enrollCourse: (id: string) => Promise<void>;\n addLearningPath: (path: LearningPath) => Promise<void>;\n updateLearningPath: (id: string, updates: Partial<LearningPath>) => Promise<void>;\n removeLearningPath: (id: string) => Promise<void>;\n addPayrollRecord: (record: PayrollRecord) => Promise<void>;\n updatePayrollRecord: (id: string, updates: Partial<PayrollRecord>) => Promise<void>;\n removePayrollRecord: (id: string) => Promise<void>;\n addTimeEntry: (entry: TimeEntry) => Promise<void>;\n updateTimeEntry: (id: string, updates: Partial<TimeEntry>) => Promise<void>;\n removeTimeEntry: (id: string) => Promise<void>;\n markNotificationRead: (id: string) => Promise<void>;\n markAllNotificationsRead: () => Promise<void>;\n}\n\nexport const useCrewFoundryStore = create<CrewFoundryState>((set) => ({\n // Overview\n metrics: [\n { label: 'Total Employees', value: '247', trend: '+5.2%' },\n { label: 'Open Positions', value: '24', trend: '+3 this week' },\n { label: 'Hiring Pipeline', value: '347', trend: '+52 applications' },\n { label: 'Employee Satisfaction', value: '4.6/5', trend: '+0.2' },\n ],\n workItems: [\n {\n id: 'w1',\n title: 'Q1 Performance Review Cycle',\n status: 'active',\n owner: 'HR',\n updatedAt: '2h ago',\n },\n {\n id: 'w2',\n title: 'New Health Benefits Enrollment',\n status: 'active',\n owner: 'Benefits',\n updatedAt: '5h ago',\n },\n {\n id: 'w3',\n title: 'Engineering Headcount Planning',\n status: 'at_risk',\n owner: 'Recruiting',\n updatedAt: '1d ago',\n },\n {\n id: 'w4',\n title: 'Employee Onboarding Automation',\n status: 'completed',\n owner: 'HR Ops',\n updatedAt: '2d ago',\n },\n ],\n selectedView: 'overview',\n initialized: false,\n loading: false,\n error: null,\n initParams: {},\n\n // Domain data\n employees: [],\n departments: [],\n jobPostings: [],\n candidates: [],\n interviews: [],\n courses: [],\n learningPaths: [],\n marketplaceServices: [],\n announcements: [],\n teams: [],\n projects: [],\n payrollRecords: [],\n leaveRequests: [],\n timeEntries: [],\n notifications: [],\n paymentMethods: [],\n invoices: [],\n vendors: [],\n clients: [],\n\n // Actions\n initializeData: async (params) => {\n if (!params.workspaceId) {\n return;\n }\n set({ loading: true, error: null, initParams: params });\n try {\n const [workspaceWithOverlapData, billingOverlap] = await Promise.all([\n runOverlap<WorkspaceBootstrapWithOverlapResponse>(\n WORKSPACE_BOOTSTRAP_WITH_OVERLAP_QUERY,\n {\n workspaceId: params.workspaceId,\n projectPagination: { limit: 50, offset: 0 },\n groupFirst: 30,\n conversationFirst: 30,\n },\n params,\n 'Unable to load workspace bootstrap with overlap data'\n ),\n // getBillingAccountsByOrg lives on the GLOBAL supergraph, not wspace —\n // route it to the global gateway (org context comes from the x-org-id\n // header the gateway auto-attaches for global-gateway calls).\n runOverlap<OverlapBillingResponse>(\n OVERLAP_BILLING_QUERY,\n undefined,\n params,\n 'Unable to load overlap billing data',\n 'global'\n ),\n ]);\n\n const bootstrap = workspaceWithOverlapData\n ? workspaceWithOverlapData.crewfoundryBootstrap\n : (\n await runGraphql<BootstrapPayload>(\n BOOTSTRAP_QUERY,\n undefined,\n params,\n 'Unable to load CrewFoundry data'\n )\n ).crewfoundryBootstrap;\n\n const overlapTeams = workspaceWithOverlapData\n ? mapOverlapTeams(workspaceWithOverlapData.groups.edges)\n : [];\n const overlapProjects = workspaceWithOverlapData\n ? mapOverlapProjects(workspaceWithOverlapData.projects.items, overlapTeams)\n : [];\n const overlapNotifications = workspaceWithOverlapData\n ? mapConversationNotifications(workspaceWithOverlapData.conversations.edges)\n : [];\n\n const teams = overlapTeams.length > 0 ? overlapTeams : bootstrap.teams;\n const projects = overlapProjects.length > 0 ? overlapProjects : bootstrap.projects;\n const notifications =\n overlapNotifications.length > 0\n ? mergeNotifications(bootstrap.notifications, overlapNotifications)\n : bootstrap.notifications;\n const paymentMethods = billingOverlap ? mapBillingMethods(billingOverlap) : [];\n\n set({\n employees: bootstrap.employees,\n departments: bootstrap.departments,\n jobPostings: bootstrap.jobPostings,\n candidates: bootstrap.candidates,\n interviews: bootstrap.interviews,\n courses: bootstrap.courses,\n learningPaths: bootstrap.learningPaths,\n marketplaceServices: bootstrap.marketplaceServices,\n announcements: bootstrap.announcements,\n teams,\n projects,\n payrollRecords: bootstrap.payrollRecords,\n leaveRequests: bootstrap.leaveRequests,\n timeEntries: bootstrap.timeEntries,\n notifications,\n paymentMethods,\n invoices: bootstrap.invoices,\n vendors: bootstrap.vendors,\n clients: bootstrap.clients,\n metrics: [\n { label: 'Total Employees', value: String(bootstrap.employees.length), trend: 'Live' },\n {\n label: 'Open Positions',\n value: String(bootstrap.jobPostings.filter((j) => j.status === 'active').length),\n trend: 'Live',\n },\n { label: 'Hiring Pipeline', value: String(bootstrap.candidates.length), trend: 'Live' },\n {\n label: 'Cross-Team Projects',\n value: String(projects.filter((project) => project.status === 'active').length),\n trend: 'Live',\n },\n ],\n initialized: true,\n loading: false,\n });\n } catch (error) {\n set({\n error: error instanceof Error ? error.message : 'Unable to load CrewFoundry data',\n loading: false,\n });\n }\n },\n setSelectedView: (view) => set({ selectedView: view }),\n setWorkItems: (items) => set({ workItems: items }),\n addEmployee: async (employee) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewEmployee: Employee }>(\n CREATE_EMPLOYEE_MUTATION,\n {\n input: {\n ...employee,\n status: normalizeStatus(employee.status),\n type: normalizeStatus(employee.type),\n },\n },\n params,\n 'Unable to create employee'\n );\n set((state) => ({ employees: [data.createCrewEmployee, ...state.employees] }));\n },\n updateEmployee: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const payload = {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n ...(updates.type ? { type: normalizeStatus(updates.type) } : {}),\n };\n const data = await runGraphql<{ updateCrewEmployee: Employee }>(\n UPDATE_EMPLOYEE_MUTATION,\n { id, input: payload },\n params,\n 'Unable to update employee'\n );\n set((state) => ({\n employees: state.employees.map((e) => (e.id === id ? data.updateCrewEmployee : e)),\n }));\n },\n removeEmployee: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewEmployee: boolean }>(\n REMOVE_EMPLOYEE_MUTATION,\n { id },\n params,\n 'Unable to remove employee'\n );\n set((state) => ({ employees: state.employees.filter((e) => e.id !== id) }));\n },\n addJobPosting: async (job) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewJobPosting: JobPosting }>(\n CREATE_JOB_MUTATION,\n {\n input: {\n ...job,\n status: normalizeStatus(job.status),\n },\n },\n params,\n 'Unable to create job posting'\n );\n set((state) => ({ jobPostings: [data.createCrewJobPosting, ...state.jobPostings] }));\n },\n updateJobPosting: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewJobPosting: JobPosting }>(\n UPDATE_JOB_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update job posting'\n );\n set((state) => ({\n jobPostings: state.jobPostings.map((j) => (j.id === id ? data.updateCrewJobPosting : j)),\n }));\n },\n addCandidate: async (candidate) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewCandidate: Candidate }>(\n CREATE_CANDIDATE_MUTATION,\n { input: { ...candidate, status: normalizeStatus(candidate.status) } },\n params,\n 'Unable to create candidate'\n );\n set((state) => ({ candidates: [data.createCrewCandidate, ...state.candidates] }));\n },\n updateCandidate: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewCandidate: Candidate }>(\n UPDATE_CANDIDATE_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update candidate'\n );\n set((state) => ({\n candidates: state.candidates.map((c) => (c.id === id ? data.updateCrewCandidate : c)),\n }));\n },\n addAnnouncement: async (announcement) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewAnnouncement: Announcement }>(\n CREATE_ANNOUNCEMENT_MUTATION,\n { input: announcement },\n params,\n 'Unable to create announcement'\n );\n set((state) => ({ announcements: [data.createCrewAnnouncement, ...state.announcements] }));\n },\n addLeaveRequest: async (request) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewLeaveRequest: LeaveRequest }>(\n CREATE_LEAVE_MUTATION,\n {\n input: {\n ...request,\n type: normalizeStatus(request.type),\n status: normalizeStatus(request.status),\n },\n },\n params,\n 'Unable to create leave request'\n );\n set((state) => ({ leaveRequests: [data.createCrewLeaveRequest, ...state.leaveRequests] }));\n },\n updateLeaveRequest: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewLeaveRequest: LeaveRequest }>(\n UPDATE_LEAVE_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.type ? { type: normalizeStatus(updates.type) } : {}),\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update leave request'\n );\n set((state) => ({\n leaveRequests: state.leaveRequests.map((l) =>\n l.id === id ? data.updateCrewLeaveRequest : l\n ),\n }));\n },\n markNotificationRead: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ markCrewNotificationRead: boolean }>(\n MARK_NOTIFICATION_MUTATION,\n { id },\n params,\n 'Unable to update notification'\n );\n set((state) => ({\n notifications: state.notifications.map((n) => (n.id === id ? { ...n, read: true } : n)),\n }));\n },\n markAllNotificationsRead: async () => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ markAllCrewNotificationsRead: boolean }>(\n MARK_ALL_NOTIFICATIONS_MUTATION,\n undefined,\n params,\n 'Unable to update notifications'\n );\n set((state) => ({ notifications: state.notifications.map((n) => ({ ...n, read: true })) }));\n },\n\n // ── Extra removes for existing entities ───────────────────────\n removeJobPosting: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewJobPosting: boolean }>(\n REMOVE_JOB_MUTATION,\n { id },\n params,\n 'Unable to remove job posting'\n );\n set((state) => ({ jobPostings: state.jobPostings.filter((j) => j.id !== id) }));\n },\n removeCandidate: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewCandidate: boolean }>(\n REMOVE_CANDIDATE_MUTATION,\n { id },\n params,\n 'Unable to remove candidate'\n );\n set((state) => ({ candidates: state.candidates.filter((c) => c.id !== id) }));\n },\n updateAnnouncement: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewAnnouncement: Announcement }>(\n UPDATE_ANNOUNCEMENT_MUTATION,\n { id, input: updates },\n params,\n 'Unable to update announcement'\n );\n set((state) => ({\n announcements: state.announcements.map((a) => (a.id === id ? data.updateCrewAnnouncement : a)),\n }));\n },\n removeAnnouncement: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewAnnouncement: boolean }>(\n REMOVE_ANNOUNCEMENT_MUTATION,\n { id },\n params,\n 'Unable to remove announcement'\n );\n set((state) => ({ announcements: state.announcements.filter((a) => a.id !== id) }));\n },\n\n // ── Interview (enum: type, status) ────────────────────────────\n addInterview: async (interview) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewInterview: Interview }>(\n CREATE_INTERVIEW_MUTATION,\n {\n input: {\n ...interview,\n type: normalizeStatus(interview.type),\n status: normalizeStatus(interview.status),\n },\n },\n params,\n 'Unable to schedule interview'\n );\n set((state) => ({ interviews: [data.createCrewInterview, ...state.interviews] }));\n },\n updateInterview: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewInterview: Interview }>(\n UPDATE_INTERVIEW_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.type ? { type: normalizeStatus(updates.type) } : {}),\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update interview'\n );\n set((state) => ({\n interviews: state.interviews.map((i) => (i.id === id ? data.updateCrewInterview : i)),\n }));\n },\n removeInterview: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewInterview: boolean }>(\n REMOVE_INTERVIEW_MUTATION,\n { id },\n params,\n 'Unable to remove interview'\n );\n set((state) => ({ interviews: state.interviews.filter((i) => i.id !== id) }));\n },\n\n // ── Invoice (enum: status) ────────────────────────────────────\n addInvoice: async (invoice) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewInvoice: Invoice }>(\n CREATE_INVOICE_MUTATION,\n { input: { ...invoice, status: normalizeStatus(invoice.status) } },\n params,\n 'Unable to create invoice'\n );\n set((state) => ({ invoices: [data.createCrewInvoice, ...state.invoices] }));\n },\n updateInvoice: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewInvoice: Invoice }>(\n UPDATE_INVOICE_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update invoice'\n );\n set((state) => ({\n invoices: state.invoices.map((i) => (i.id === id ? data.updateCrewInvoice : i)),\n }));\n },\n removeInvoice: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewInvoice: boolean }>(\n REMOVE_INVOICE_MUTATION,\n { id },\n params,\n 'Unable to remove invoice'\n );\n set((state) => ({ invoices: state.invoices.filter((i) => i.id !== id) }));\n },\n\n // ── Vendor (enum: status) ─────────────────────────────────────\n addVendor: async (vendor) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewVendor: Vendor }>(\n CREATE_VENDOR_MUTATION,\n { input: { ...vendor, status: normalizeStatus(vendor.status) } },\n params,\n 'Unable to create vendor'\n );\n set((state) => ({ vendors: [data.createCrewVendor, ...state.vendors] }));\n },\n updateVendor: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewVendor: Vendor }>(\n UPDATE_VENDOR_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update vendor'\n );\n set((state) => ({\n vendors: state.vendors.map((v) => (v.id === id ? data.updateCrewVendor : v)),\n }));\n },\n removeVendor: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewVendor: boolean }>(\n REMOVE_VENDOR_MUTATION,\n { id },\n params,\n 'Unable to remove vendor'\n );\n set((state) => ({ vendors: state.vendors.filter((v) => v.id !== id) }));\n },\n\n // ── Client (enum: status; `since`) ────────────────────────────\n addClient: async (client) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewClient: Client }>(\n CREATE_CLIENT_MUTATION,\n { input: { ...client, status: normalizeStatus(client.status) } },\n params,\n 'Unable to create client'\n );\n set((state) => ({ clients: [data.createCrewClient, ...state.clients] }));\n },\n updateClient: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewClient: Client }>(\n UPDATE_CLIENT_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update client'\n );\n set((state) => ({\n clients: state.clients.map((c) => (c.id === id ? data.updateCrewClient : c)),\n }));\n },\n removeClient: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewClient: boolean }>(\n REMOVE_CLIENT_MUTATION,\n { id },\n params,\n 'Unable to remove client'\n );\n set((state) => ({ clients: state.clients.filter((c) => c.id !== id) }));\n },\n\n // ── Team (plain status; not normalized) ───────────────────────\n addTeam: async (team) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewTeam: Team }>(\n CREATE_TEAM_MUTATION,\n { input: team },\n params,\n 'Unable to create team'\n );\n set((state) => ({ teams: [data.createCrewTeam, ...state.teams] }));\n },\n updateTeam: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewTeam: Team }>(\n UPDATE_TEAM_MUTATION,\n { id, input: updates },\n params,\n 'Unable to update team'\n );\n set((state) => ({\n teams: state.teams.map((t) => (t.id === id ? data.updateCrewTeam : t)),\n }));\n },\n removeTeam: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewTeam: boolean }>(\n REMOVE_TEAM_MUTATION,\n { id },\n params,\n 'Unable to remove team'\n );\n set((state) => ({ teams: state.teams.filter((t) => t.id !== id) }));\n },\n\n // ── Project (enum: status, priority) ──────────────────────────\n addProject: async (project) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewProject: Project }>(\n CREATE_PROJECT_MUTATION,\n {\n input: {\n ...project,\n status: normalizeStatus(project.status),\n priority: normalizeStatus(project.priority),\n },\n },\n params,\n 'Unable to create project'\n );\n set((state) => ({ projects: [data.createCrewProject, ...state.projects] }));\n },\n updateProject: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewProject: Project }>(\n UPDATE_PROJECT_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n ...(updates.priority ? { priority: normalizeStatus(updates.priority) } : {}),\n },\n },\n params,\n 'Unable to update project'\n );\n set((state) => ({\n projects: state.projects.map((p) => (p.id === id ? data.updateCrewProject : p)),\n }));\n },\n removeProject: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewProject: boolean }>(\n REMOVE_PROJECT_MUTATION,\n { id },\n params,\n 'Unable to remove project'\n );\n set((state) => ({ projects: state.projects.filter((p) => p.id !== id) }));\n },\n\n // ── MarketplaceService (enum: status) ─────────────────────────\n addMarketplaceService: async (service) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewMarketplaceService: MarketplaceService }>(\n CREATE_MARKETPLACE_SERVICE_MUTATION,\n { input: { ...service, status: normalizeStatus(service.status) } },\n params,\n 'Unable to create service'\n );\n set((state) => ({\n marketplaceServices: [data.createCrewMarketplaceService, ...state.marketplaceServices],\n }));\n },\n updateMarketplaceService: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewMarketplaceService: MarketplaceService }>(\n UPDATE_MARKETPLACE_SERVICE_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update service'\n );\n set((state) => ({\n marketplaceServices: state.marketplaceServices.map((s) =>\n s.id === id ? data.updateCrewMarketplaceService : s\n ),\n }));\n },\n removeMarketplaceService: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewMarketplaceService: boolean }>(\n REMOVE_MARKETPLACE_SERVICE_MUTATION,\n { id },\n params,\n 'Unable to remove service'\n );\n set((state) => ({\n marketplaceServices: state.marketplaceServices.filter((s) => s.id !== id),\n }));\n },\n\n // ── Department (plain status; not normalized) ─────────────────\n addDepartment: async (department) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewDepartment: Department }>(\n CREATE_DEPARTMENT_MUTATION,\n { input: department },\n params,\n 'Unable to create department'\n );\n set((state) => ({ departments: [data.createCrewDepartment, ...state.departments] }));\n },\n updateDepartment: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewDepartment: Department }>(\n UPDATE_DEPARTMENT_MUTATION,\n { id, input: updates },\n params,\n 'Unable to update department'\n );\n set((state) => ({\n departments: state.departments.map((d) => (d.id === id ? data.updateCrewDepartment : d)),\n }));\n },\n removeDepartment: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewDepartment: boolean }>(\n REMOVE_DEPARTMENT_MUTATION,\n { id },\n params,\n 'Unable to remove department'\n );\n set((state) => ({ departments: state.departments.filter((d) => d.id !== id) }));\n },\n\n // ── Course (LearningCourse; plain status) + enroll ────────────\n addCourse: async (course) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewCourse: LearningCourse }>(\n CREATE_COURSE_MUTATION,\n { input: course },\n params,\n 'Unable to create course'\n );\n set((state) => ({ courses: [data.createCrewCourse, ...state.courses] }));\n },\n updateCourse: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewCourse: LearningCourse }>(\n UPDATE_COURSE_MUTATION,\n { id, input: updates },\n params,\n 'Unable to update course'\n );\n set((state) => ({\n courses: state.courses.map((c) => (c.id === id ? data.updateCrewCourse : c)),\n }));\n },\n removeCourse: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewCourse: boolean }>(\n REMOVE_COURSE_MUTATION,\n { id },\n params,\n 'Unable to remove course'\n );\n set((state) => ({ courses: state.courses.filter((c) => c.id !== id) }));\n },\n enrollCourse: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ enrollCrewCourse: LearningCourse }>(\n ENROLL_COURSE_MUTATION,\n { id },\n params,\n 'Unable to enroll in course'\n );\n set((state) => ({\n courses: state.courses.map((c) => (c.id === id ? data.enrollCrewCourse : c)),\n }));\n },\n\n // ── LearningPath (plain; not normalized) ──────────────────────\n addLearningPath: async (path) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewLearningPath: LearningPath }>(\n CREATE_LEARNING_PATH_MUTATION,\n { input: path },\n params,\n 'Unable to create learning path'\n );\n set((state) => ({ learningPaths: [data.createCrewLearningPath, ...state.learningPaths] }));\n },\n updateLearningPath: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewLearningPath: LearningPath }>(\n UPDATE_LEARNING_PATH_MUTATION,\n { id, input: updates },\n params,\n 'Unable to update learning path'\n );\n set((state) => ({\n learningPaths: state.learningPaths.map((l) => (l.id === id ? data.updateCrewLearningPath : l)),\n }));\n },\n removeLearningPath: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewLearningPath: boolean }>(\n REMOVE_LEARNING_PATH_MUTATION,\n { id },\n params,\n 'Unable to remove learning path'\n );\n set((state) => ({ learningPaths: state.learningPaths.filter((l) => l.id !== id) }));\n },\n\n // ── PayrollRecord (enum: status) ──────────────────────────────\n addPayrollRecord: async (record) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewPayrollRecord: PayrollRecord }>(\n CREATE_PAYROLL_MUTATION,\n { input: { ...record, status: normalizeStatus(record.status) } },\n params,\n 'Unable to create payroll record'\n );\n set((state) => ({ payrollRecords: [data.createCrewPayrollRecord, ...state.payrollRecords] }));\n },\n updatePayrollRecord: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewPayrollRecord: PayrollRecord }>(\n UPDATE_PAYROLL_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update payroll record'\n );\n set((state) => ({\n payrollRecords: state.payrollRecords.map((p) => (p.id === id ? data.updateCrewPayrollRecord : p)),\n }));\n },\n removePayrollRecord: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewPayrollRecord: boolean }>(\n REMOVE_PAYROLL_MUTATION,\n { id },\n params,\n 'Unable to remove payroll record'\n );\n set((state) => ({ payrollRecords: state.payrollRecords.filter((p) => p.id !== id) }));\n },\n\n // ── TimeEntry (plain status; not normalized) ──────────────────\n addTimeEntry: async (entry) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewTimeEntry: TimeEntry }>(\n CREATE_TIME_ENTRY_MUTATION,\n { input: entry },\n params,\n 'Unable to create time entry'\n );\n set((state) => ({ timeEntries: [data.createCrewTimeEntry, ...state.timeEntries] }));\n },\n updateTimeEntry: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewTimeEntry: TimeEntry }>(\n UPDATE_TIME_ENTRY_MUTATION,\n { id, input: updates },\n params,\n 'Unable to update time entry'\n );\n set((state) => ({\n timeEntries: state.timeEntries.map((t) => (t.id === id ? data.updateCrewTimeEntry : t)),\n }));\n },\n removeTimeEntry: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewTimeEntry: boolean }>(\n REMOVE_TIME_ENTRY_MUTATION,\n { id },\n params,\n 'Unable to remove time entry'\n );\n set((state) => ({ timeEntries: state.timeEntries.filter((t) => t.id !== id) }));\n },\n}));\n"],"mappings":";;;AA8RA,IAAM,IAAkB,onEAyBlB,IAAyC,o/FAsEzC,IAAwB,kRAmBxB,IAA2B,yOAC3B,IAA2B,4PAC3B,IAA2B,yEAC3B,IAAsB,+PACtB,IAAsB,kRACtB,IAA4B,2OAC5B,IAA4B,8PAC5B,IAA+B,8MAC/B,IAAwB,oNACxB,IAAwB,uOACxB,IAA6B,qFAC7B,KAAkC,0EAGlC,KAAsB,6EACtB,KAA4B,2EAC5B,KAA+B,iOAC/B,KAA+B,iFAG/B,KAA4B,0MAC5B,KAA4B,6NAC5B,KAA4B,2EAG5B,IAA0B,mKAC1B,IAA0B,sLAC1B,IAA0B,uEAG1B,IAAyB,4KACzB,IAAyB,+LACzB,IAAyB,qEAGzB,IAAyB,8KACzB,IAAyB,iMACzB,IAAyB,qEAGzB,IAAuB,gMACvB,IAAuB,mNACvB,IAAuB,iEAGvB,IAA0B,+OAC1B,IAA0B,kQAC1B,IAA0B,uEAG1B,IAAsC,0OACtC,IAAsC,6PACtC,IAAsC,6FAGtC,IAA6B,8KAC7B,IAA6B,iMAC7B,IAA6B,6EAG7B,IAAgB,qHAChB,IAAyB,iGAAiG,EAAc,OACxI,IAAyB,oHAAoH,EAAc,OAC3J,KAAyB,qEACzB,IAAyB,qEAAqE,EAAc,OAG5G,IAAgC,2LAChC,IAAgC,8MAChC,IAAgC,iFAGhC,IAA0B,+NAC1B,IAA0B,kPAC1B,KAA0B,mFAG1B,KAA6B,kMAC7B,KAA6B,qNAC7B,KAA6B,2EAE7B,KAAmB,MAAkB,E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AAO;EAC7B,IAAM,IAAS,EAAoB,UAAU,CAAC;AAO9C,EANA,MAAM,EACJ,IACA,EAAE,OAAI,EACN,GACA,8BACD,EACD,GAAK,OAAW,EAAE,aAAa,EAAM,YAAY,QAAQ,MAAM,EAAE,OAAO,EAAG,EAAE,EAAE;;CAElF,EAAE"}
|
|
1
|
+
{"version":3,"file":"crewfoundryStore.js","names":[],"sources":["../../../src/crewfoundry/store/crewfoundryStore.ts"],"sourcesContent":["import { create } from 'zustand';\nimport type { OverviewMetric, WorkItem } from '../types';\n\n// ── Domain Types ────────────────────────────────────────────────\nexport interface Employee {\n id: string;\n firstName: string;\n lastName: string;\n email: string;\n department: string;\n position: string;\n status: 'active' | 'inactive' | 'on_leave' | 'terminated';\n type: 'full_time' | 'part_time' | 'contract' | 'intern';\n salary: number;\n startDate: string;\n avatar?: string;\n location: string;\n managerId?: string;\n phone: string;\n performanceScore: number;\n}\n\nexport interface Department {\n id: string;\n name: string;\n headId: string;\n headName: string;\n employeeCount: number;\n budget: number;\n location: string;\n status: 'active' | 'restructuring';\n}\n\nexport interface JobPosting {\n id: string;\n title: string;\n department: string;\n location: string;\n type: 'full_time' | 'part_time' | 'contract' | 'remote';\n experienceLevel: 'entry' | 'mid' | 'senior' | 'lead' | 'executive';\n salaryMin: number;\n salaryMax: number;\n status: 'draft' | 'active' | 'paused' | 'closed' | 'filled';\n applicants: number;\n postedDate: string;\n deadline: string;\n description: string;\n requirements: string[];\n benefits: string[];\n}\n\nexport interface Candidate {\n id: string;\n firstName: string;\n lastName: string;\n email: string;\n phone: string;\n position: string;\n status: 'new' | 'screening' | 'interview' | 'assessment' | 'offer' | 'hired' | 'rejected';\n appliedDate: string;\n resumeUrl?: string;\n rating: number;\n source: string;\n experience: number;\n skills: string[];\n currentCompany: string;\n notes: string;\n}\n\nexport interface Interview {\n id: string;\n candidateId: string;\n candidateName: string;\n position: string;\n interviewerName: string;\n date: string;\n time: string;\n type: 'phone' | 'video' | 'onsite' | 'panel' | 'technical';\n status: 'scheduled' | 'completed' | 'cancelled' | 'no_show';\n feedback?: string;\n rating?: number;\n}\n\nexport interface LearningCourse {\n id: string;\n title: string;\n category: string;\n instructor: string;\n duration: string;\n level: 'beginner' | 'intermediate' | 'advanced';\n enrolled: number;\n completed: number;\n rating: number;\n status: 'active' | 'draft' | 'archived';\n thumbnail?: string;\n description: string;\n modules: number;\n skills: string[];\n}\n\nexport interface LearningPath {\n id: string;\n title: string;\n description: string;\n courses: string[];\n duration: string;\n level: string;\n enrolled: number;\n completionRate: number;\n}\n\nexport interface MarketplaceService {\n id: string;\n title: string;\n provider: string;\n category: string;\n price: number;\n priceType: 'hourly' | 'fixed' | 'monthly';\n rating: number;\n reviews: number;\n description: string;\n deliveryTime: string;\n status: 'active' | 'paused' | 'pending';\n skills: string[];\n}\n\nexport interface Announcement {\n id: string;\n title: string;\n content: string;\n author: string;\n authorRole: string;\n category: 'general' | 'hr' | 'it' | 'emergency' | 'event';\n priority: 'low' | 'medium' | 'high' | 'urgent';\n isPinned: boolean;\n createdAt: string;\n viewCount: number;\n tags: string[];\n}\n\nexport interface Team {\n id: string;\n name: string;\n description: string;\n leadId: string;\n leadName: string;\n members: string[];\n memberCount: number;\n department: string;\n status: 'active' | 'forming' | 'disbanded';\n projectCount: number;\n createdAt: string;\n}\n\nexport interface Project {\n id: string;\n name: string;\n description: string;\n status: 'planning' | 'active' | 'on_hold' | 'completed' | 'cancelled';\n priority: 'low' | 'medium' | 'high' | 'critical';\n startDate: string;\n endDate: string;\n progress: number;\n budget: number;\n spent: number;\n teamId: string;\n teamName: string;\n managerId: string;\n managerName: string;\n tasks: number;\n completedTasks: number;\n}\n\nexport interface PayrollRecord {\n id: string;\n employeeId: string;\n employeeName: string;\n department: string;\n period: string;\n grossPay: number;\n deductions: number;\n netPay: number;\n status: 'draft' | 'processing' | 'approved' | 'paid' | 'failed';\n payDate: string;\n paymentMethod: string;\n}\n\nexport interface LeaveRequest {\n id: string;\n employeeId: string;\n employeeName: string;\n department: string;\n type: 'annual' | 'sick' | 'personal' | 'maternity' | 'paternity' | 'unpaid';\n startDate: string;\n endDate: string;\n days: number;\n status: 'pending' | 'approved' | 'rejected' | 'cancelled';\n reason: string;\n approverName?: string;\n}\n\nexport interface TimeEntry {\n id: string;\n employeeId: string;\n employeeName: string;\n date: string;\n clockIn: string;\n clockOut: string;\n totalHours: number;\n overtime: number;\n project: string;\n status: 'pending' | 'approved' | 'rejected';\n}\n\nexport interface Notification {\n id: string;\n title: string;\n message: string;\n type: 'info' | 'success' | 'warning' | 'error';\n category: string;\n read: boolean;\n createdAt: string;\n actionUrl?: string;\n}\n\nexport interface Invoice {\n id: string;\n number: string;\n clientName: string;\n amount: number;\n status: 'draft' | 'sent' | 'paid' | 'overdue' | 'cancelled';\n issueDate: string;\n dueDate: string;\n items: { description: string; amount: number }[];\n}\n\nexport interface Vendor {\n id: string;\n name: string;\n category: string;\n contactPerson: string;\n email: string;\n phone: string;\n status: 'active' | 'inactive' | 'pending';\n contractValue: number;\n rating: number;\n}\n\nexport interface Client {\n id: string;\n name: string;\n industry: string;\n contactPerson: string;\n email: string;\n phone: string;\n status: 'active' | 'prospect' | 'churned';\n revenue: number;\n projects: number;\n since: string;\n}\n\nexport interface ExternalPaymentMethod {\n id: string;\n type: 'bank' | 'card';\n name: string;\n bank: string;\n last4: string;\n status: 'primary' | 'active';\n expiry?: string;\n}\n\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\nimport type { Gateway } from '@burdenoff/fe-libs/shared/config';\n\ntype InitParams = {\n workspaceId?: string;\n authToken?: string;\n apiGatewayUrl?: string;\n actorId?: string;\n};\n\ntype GraphqlResult<T> = {\n data: T | null;\n errors?: Array<{ message: string }>;\n};\n\nconst BOOTSTRAP_QUERY = `\n query CrewfoundryBootstrap {\n crewfoundryBootstrap {\n employees { id firstName lastName email department position status type salary startDate avatar location managerId phone performanceScore }\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 }\n interviews { id candidateId candidateName position interviewerName date time type status feedback rating }\n courses { id title category instructor duration level enrolled completed rating status thumbnail description modules skills }\n learningPaths { id title description courses duration level enrolled completionRate }\n marketplaceServices { id title provider category price priceType rating reviews description deliveryTime status skills }\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 }\n notifications { id title message type category read createdAt actionUrl }\n invoices { id number clientName amount status issueDate dueDate items }\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`;\n\nconst WORKSPACE_BOOTSTRAP_WITH_OVERLAP_QUERY = `\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 }\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 }\n interviews { id candidateId candidateName position interviewerName date time type status feedback rating }\n courses { id title category instructor duration level enrolled completed rating status thumbnail description modules skills }\n learningPaths { id title description courses duration level enrolled completionRate }\n marketplaceServices { id title provider category price priceType rating reviews description deliveryTime status skills }\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 }\n notifications { id title message type category read createdAt actionUrl }\n invoices { id number clientName amount status issueDate dueDate items }\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`;\n\nconst OVERLAP_BILLING_QUERY = `\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`;\n\nconst CREATE_EMPLOYEE_MUTATION = `mutation CreateCrewEmployee($input: CreateCrewEmployeeInput!) { createCrewEmployee(input: $input) { id firstName lastName email department position status type salary startDate avatar location managerId phone performanceScore } }`;\nconst UPDATE_EMPLOYEE_MUTATION = `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 } }`;\nconst REMOVE_EMPLOYEE_MUTATION = `mutation RemoveCrewEmployee($id: ID!) { removeCrewEmployee(id: $id) }`;\nconst CREATE_JOB_MUTATION = `mutation CreateCrewJobPosting($input: CreateCrewJobPostingInput!) { createCrewJobPosting(input: $input) { id title department location type experienceLevel salaryMin salaryMax status applicants postedDate deadline description requirements benefits } }`;\nconst UPDATE_JOB_MUTATION = `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 } }`;\nconst CREATE_CANDIDATE_MUTATION = `mutation CreateCrewCandidate($input: CreateCrewCandidateInput!) { createCrewCandidate(input: $input) { id firstName lastName email phone position status appliedDate resumeUrl rating source experience skills currentCompany notes } }`;\nconst UPDATE_CANDIDATE_MUTATION = `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 } }`;\nconst CREATE_ANNOUNCEMENT_MUTATION = `mutation CreateCrewAnnouncement($input: CreateCrewAnnouncementInput!) { createCrewAnnouncement(input: $input) { id title content author authorRole category priority isPinned createdAt viewCount tags } }`;\nconst CREATE_LEAVE_MUTATION = `mutation CreateCrewLeaveRequest($input: CreateCrewLeaveRequestInput!) { createCrewLeaveRequest(input: $input) { id employeeId employeeName department type startDate endDate days status reason approverName } }`;\nconst UPDATE_LEAVE_MUTATION = `mutation UpdateCrewLeaveRequest($id: ID!, $input: UpdateCrewLeaveRequestInput!) { updateCrewLeaveRequest(id: $id, input: $input) { id employeeId employeeName department type startDate endDate days status reason approverName } }`;\nconst MARK_NOTIFICATION_MUTATION = `mutation MarkCrewNotificationRead($id: ID!) { markCrewNotificationRead(id: $id) }`;\nconst MARK_ALL_NOTIFICATIONS_MUTATION = `mutation MarkAllCrewNotificationsRead { markAllCrewNotificationsRead }`;\n\n// Extra removes / updates for existing entities (delete + edit buttons).\nconst REMOVE_JOB_MUTATION = `mutation RemoveCrewJobPosting($id: ID!) { removeCrewJobPosting(id: $id) }`;\nconst REMOVE_CANDIDATE_MUTATION = `mutation RemoveCrewCandidate($id: ID!) { removeCrewCandidate(id: $id) }`;\nconst UPDATE_ANNOUNCEMENT_MUTATION = `mutation UpdateCrewAnnouncement($id: ID!, $input: UpdateCrewAnnouncementInput!) { updateCrewAnnouncement(id: $id, input: $input) { id title content author authorRole category priority isPinned createdAt viewCount tags } }`;\nconst REMOVE_ANNOUNCEMENT_MUTATION = `mutation RemoveCrewAnnouncement($id: ID!) { removeCrewAnnouncement(id: $id) }`;\n\n// Interview\nconst CREATE_INTERVIEW_MUTATION = `mutation CreateCrewInterview($input: CreateCrewInterviewInput!) { createCrewInterview(input: $input) { id candidateId candidateName position interviewerName date time type status feedback rating } }`;\nconst UPDATE_INTERVIEW_MUTATION = `mutation UpdateCrewInterview($id: ID!, $input: UpdateCrewInterviewInput!) { updateCrewInterview(id: $id, input: $input) { id candidateId candidateName position interviewerName date time type status feedback rating } }`;\nconst REMOVE_INTERVIEW_MUTATION = `mutation RemoveCrewInterview($id: ID!) { removeCrewInterview(id: $id) }`;\n\n// Invoice\nconst CREATE_INVOICE_MUTATION = `mutation CreateCrewInvoice($input: CreateCrewInvoiceInput!) { createCrewInvoice(input: $input) { id number clientName amount status issueDate dueDate items } }`;\nconst UPDATE_INVOICE_MUTATION = `mutation UpdateCrewInvoice($id: ID!, $input: UpdateCrewInvoiceInput!) { updateCrewInvoice(id: $id, input: $input) { id number clientName amount status issueDate dueDate items } }`;\nconst REMOVE_INVOICE_MUTATION = `mutation RemoveCrewInvoice($id: ID!) { removeCrewInvoice(id: $id) }`;\n\n// Vendor\nconst CREATE_VENDOR_MUTATION = `mutation CreateCrewVendor($input: CreateCrewVendorInput!) { createCrewVendor(input: $input) { id name category contactPerson email phone status contractValue rating } }`;\nconst UPDATE_VENDOR_MUTATION = `mutation UpdateCrewVendor($id: ID!, $input: UpdateCrewVendorInput!) { updateCrewVendor(id: $id, input: $input) { id name category contactPerson email phone status contractValue rating } }`;\nconst REMOVE_VENDOR_MUTATION = `mutation RemoveCrewVendor($id: ID!) { removeCrewVendor(id: $id) }`;\n\n// Client\nconst CREATE_CLIENT_MUTATION = `mutation CreateCrewClient($input: CreateCrewClientInput!) { createCrewClient(input: $input) { id name industry contactPerson email phone status revenue projects since } }`;\nconst UPDATE_CLIENT_MUTATION = `mutation UpdateCrewClient($id: ID!, $input: UpdateCrewClientInput!) { updateCrewClient(id: $id, input: $input) { id name industry contactPerson email phone status revenue projects since } }`;\nconst REMOVE_CLIENT_MUTATION = `mutation RemoveCrewClient($id: ID!) { removeCrewClient(id: $id) }`;\n\n// Team\nconst CREATE_TEAM_MUTATION = `mutation CreateCrewTeam($input: CreateCrewTeamInput!) { createCrewTeam(input: $input) { id name description leadId leadName members memberCount department status projectCount createdAt } }`;\nconst UPDATE_TEAM_MUTATION = `mutation UpdateCrewTeam($id: ID!, $input: UpdateCrewTeamInput!) { updateCrewTeam(id: $id, input: $input) { id name description leadId leadName members memberCount department status projectCount createdAt } }`;\nconst REMOVE_TEAM_MUTATION = `mutation RemoveCrewTeam($id: ID!) { removeCrewTeam(id: $id) }`;\n\n// Project\nconst CREATE_PROJECT_MUTATION = `mutation CreateCrewProject($input: CreateCrewProjectInput!) { createCrewProject(input: $input) { id name description status priority startDate endDate progress budget spent teamId teamName managerId managerName tasks completedTasks } }`;\nconst UPDATE_PROJECT_MUTATION = `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 } }`;\nconst REMOVE_PROJECT_MUTATION = `mutation RemoveCrewProject($id: ID!) { removeCrewProject(id: $id) }`;\n\n// MarketplaceService\nconst CREATE_MARKETPLACE_SERVICE_MUTATION = `mutation CreateCrewMarketplaceService($input: CreateCrewMarketplaceServiceInput!) { createCrewMarketplaceService(input: $input) { id title provider category price priceType rating reviews description deliveryTime status skills } }`;\nconst UPDATE_MARKETPLACE_SERVICE_MUTATION = `mutation UpdateCrewMarketplaceService($id: ID!, $input: UpdateCrewMarketplaceServiceInput!) { updateCrewMarketplaceService(id: $id, input: $input) { id title provider category price priceType rating reviews description deliveryTime status skills } }`;\nconst REMOVE_MARKETPLACE_SERVICE_MUTATION = `mutation RemoveCrewMarketplaceService($id: ID!) { removeCrewMarketplaceService(id: $id) }`;\n\n// Department\nconst CREATE_DEPARTMENT_MUTATION = `mutation CreateCrewDepartment($input: CreateCrewDepartmentInput!) { createCrewDepartment(input: $input) { id name headId headName employeeCount budget location status } }`;\nconst UPDATE_DEPARTMENT_MUTATION = `mutation UpdateCrewDepartment($id: ID!, $input: UpdateCrewDepartmentInput!) { updateCrewDepartment(id: $id, input: $input) { id name headId headName employeeCount budget location status } }`;\nconst REMOVE_DEPARTMENT_MUTATION = `mutation RemoveCrewDepartment($id: ID!) { removeCrewDepartment(id: $id) }`;\n\n// Course (LearningCourse) + enroll\nconst COURSE_FIELDS = `id title category instructor duration level enrolled completed rating status thumbnail description modules skills`;\nconst CREATE_COURSE_MUTATION = `mutation CreateCrewCourse($input: CreateCrewCourseInput!) { createCrewCourse(input: $input) { ${COURSE_FIELDS} } }`;\nconst UPDATE_COURSE_MUTATION = `mutation UpdateCrewCourse($id: ID!, $input: UpdateCrewCourseInput!) { updateCrewCourse(id: $id, input: $input) { ${COURSE_FIELDS} } }`;\nconst REMOVE_COURSE_MUTATION = `mutation RemoveCrewCourse($id: ID!) { removeCrewCourse(id: $id) }`;\nconst ENROLL_COURSE_MUTATION = `mutation EnrollCrewCourse($id: ID!) { enrollCrewCourse(id: $id) { ${COURSE_FIELDS} } }`;\n\n// LearningPath\nconst CREATE_LEARNING_PATH_MUTATION = `mutation CreateCrewLearningPath($input: CreateCrewLearningPathInput!) { createCrewLearningPath(input: $input) { id title description courses duration level enrolled completionRate } }`;\nconst UPDATE_LEARNING_PATH_MUTATION = `mutation UpdateCrewLearningPath($id: ID!, $input: UpdateCrewLearningPathInput!) { updateCrewLearningPath(id: $id, input: $input) { id title description courses duration level enrolled completionRate } }`;\nconst REMOVE_LEARNING_PATH_MUTATION = `mutation RemoveCrewLearningPath($id: ID!) { removeCrewLearningPath(id: $id) }`;\n\n// PayrollRecord\nconst CREATE_PAYROLL_MUTATION = `mutation CreateCrewPayrollRecord($input: CreateCrewPayrollRecordInput!) { createCrewPayrollRecord(input: $input) { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod } }`;\nconst UPDATE_PAYROLL_MUTATION = `mutation UpdateCrewPayrollRecord($id: ID!, $input: UpdateCrewPayrollRecordInput!) { updateCrewPayrollRecord(id: $id, input: $input) { id employeeId employeeName department period grossPay deductions netPay status payDate paymentMethod } }`;\nconst REMOVE_PAYROLL_MUTATION = `mutation RemoveCrewPayrollRecord($id: ID!) { removeCrewPayrollRecord(id: $id) }`;\n\n// TimeEntry\nconst CREATE_TIME_ENTRY_MUTATION = `mutation CreateCrewTimeEntry($input: CreateCrewTimeEntryInput!) { createCrewTimeEntry(input: $input) { id employeeId employeeName date clockIn clockOut totalHours overtime project status } }`;\nconst UPDATE_TIME_ENTRY_MUTATION = `mutation UpdateCrewTimeEntry($id: ID!, $input: UpdateCrewTimeEntryInput!) { updateCrewTimeEntry(id: $id, input: $input) { id employeeId employeeName date clockIn clockOut totalHours overtime project status } }`;\nconst REMOVE_TIME_ENTRY_MUTATION = `mutation RemoveCrewTimeEntry($id: ID!) { removeCrewTimeEntry(id: $id) }`;\n\nconst normalizeStatus = (value: string) => value.toUpperCase().replaceAll('-', '_');\n\nconst toDateOnly = (value?: string | null) => (value ? value.slice(0, 10) : 'TBD');\n\nconst asRecord = (value: unknown): Record<string, unknown> | null => {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return null;\n }\n return value as Record<string, unknown>;\n};\n\nconst asNumber = (value: unknown): number | null => (typeof value === 'number' ? value : null);\n\nconst asString = (value: unknown): string | null => (typeof value === 'string' ? value : null);\n\nconst mapProjectStatus = (value: string): Project['status'] => {\n const status = value.toLowerCase();\n if (status === 'active') return 'active';\n if (status === 'completed') return 'completed';\n if (status === 'cancelled') return 'cancelled';\n if (status === 'archived') return 'on_hold';\n return 'planning';\n};\n\nconst mapGroupStatus = (value: string): Team['status'] => {\n const status = value.toLowerCase();\n if (status === 'active') return 'active';\n if (status === 'inactive' || status === 'archived' || status === 'deleted') return 'disbanded';\n return 'forming';\n};\n\ntype OverlapWorkspaceResponse = {\n projects: {\n items: Array<{\n id: string;\n name: string;\n key: string;\n creatorId: string;\n status: string;\n config?: unknown;\n archived: boolean;\n createdAt: string;\n updatedAt: string;\n }>;\n };\n groups: {\n edges: Array<{\n node: {\n id: string;\n name: string;\n description?: string | null;\n groupType?: string | null;\n status: string;\n memberCount: number;\n ownerId: string;\n createdAt: string;\n };\n }>;\n };\n conversations: {\n edges: Array<{\n node: {\n id: string;\n title?: string | null;\n description?: string | null;\n state: string;\n unreadCount: number;\n memberCount: number;\n updatedAt: string;\n };\n }>;\n };\n};\n\ntype WorkspaceBootstrapWithOverlapResponse = BootstrapPayload & OverlapWorkspaceResponse;\n\ntype OverlapBillingResponse = {\n getBillingAccountsByOrg: Array<{\n id?: string | null;\n name?: string | null;\n isDefault?: boolean | null;\n paymentMethods?: Array<{\n id: string;\n type: string;\n brand?: string | null;\n last4?: string | null;\n isDefault: boolean;\n expiryMonth?: number | null;\n expiryYear?: number | null;\n } | null> | null;\n }>;\n};\n\ntype BootstrapPayload = {\n crewfoundryBootstrap: {\n employees: Employee[];\n departments: Department[];\n jobPostings: JobPosting[];\n candidates: Candidate[];\n interviews: Interview[];\n courses: LearningCourse[];\n learningPaths: LearningPath[];\n marketplaceServices: MarketplaceService[];\n announcements: Announcement[];\n teams: Team[];\n projects: Project[];\n payrollRecords: PayrollRecord[];\n leaveRequests: LeaveRequest[];\n timeEntries: TimeEntry[];\n notifications: Notification[];\n invoices: Invoice[];\n vendors: Vendor[];\n clients: Client[];\n };\n};\n\nconst mapOverlapProjects = (\n projects: OverlapWorkspaceResponse['projects']['items'],\n teams: Team[]\n) =>\n projects.map((project, index): Project => {\n const config = asRecord(project.config);\n const budget = asNumber(config?.budget) ?? 25000 + index * 2500;\n const spent =\n asNumber(config?.spent) ?? Math.round(budget * (project.status === 'COMPLETED' ? 1 : 0.62));\n const progress = asNumber(config?.progress) ?? (project.status === 'COMPLETED' ? 100 : 58);\n const tasks = asNumber(config?.tasks) ?? 20 + (index % 9);\n const completedTasks = asNumber(config?.completedTasks) ?? Math.round((progress / 100) * tasks);\n const team = teams[index % Math.max(teams.length, 1)];\n\n return {\n id: project.id,\n name: project.name,\n description: asString(config?.description) || `${project.key} delivery plan`,\n status: mapProjectStatus(project.status),\n priority: (asString(config?.priority)?.toLowerCase() as Project['priority']) || 'medium',\n startDate: toDateOnly(project.createdAt),\n endDate: toDateOnly(project.updatedAt),\n progress,\n budget,\n spent,\n teamId: team?.id || 'unassigned',\n teamName: team?.name || 'Unassigned Team',\n managerId: project.creatorId,\n managerName: `Lead ${project.creatorId.slice(0, 8)}`,\n tasks,\n completedTasks,\n };\n });\n\nconst mapOverlapTeams = (groups: OverlapWorkspaceResponse['groups']['edges']): Team[] =>\n groups.map(({ node }) => ({\n id: node.id,\n name: node.name,\n description: node.description || `${node.name} team workspace`,\n leadId: node.ownerId,\n leadName: `Lead ${node.ownerId.slice(0, 8)}`,\n members: [],\n memberCount: node.memberCount,\n department: node.groupType?.toLowerCase().replaceAll('_', ' ') || 'operations',\n status: mapGroupStatus(node.status),\n projectCount: 0,\n createdAt: toDateOnly(node.createdAt),\n }));\n\nconst mapConversationNotifications = (\n conversations: OverlapWorkspaceResponse['conversations']['edges']\n): Notification[] =>\n conversations\n .filter(({ node }) => node.unreadCount > 0)\n .map(({ node }) => ({\n id: `conversation-${node.id}`,\n title: node.title || 'Conversation update',\n message: `${node.unreadCount} unread in ${node.memberCount}-member channel`,\n type: node.state.toLowerCase() === 'active' ? 'info' : 'warning',\n category: 'communications',\n read: false,\n createdAt: node.updatedAt,\n actionUrl: `/crewfoundry/communications/messages-page`,\n }));\n\nconst mergeNotifications = (base: Notification[], overlap: Notification[]) => {\n const ids = new Set(base.map((item) => item.id));\n const newItems = overlap.filter((item) => !ids.has(item.id));\n return [...newItems, ...base];\n};\n\nconst mapBillingMethods = (data: OverlapBillingResponse): ExternalPaymentMethod[] => {\n const account =\n data.getBillingAccountsByOrg.find((item) => item?.isDefault && item?.id) ||\n data.getBillingAccountsByOrg.find((item) => item?.id);\n\n if (!account?.id) {\n return [];\n }\n\n return (account.paymentMethods || [])\n .filter((item): item is NonNullable<typeof item> => Boolean(item))\n .map((method) => {\n const month = method.expiryMonth ? String(method.expiryMonth).padStart(2, '0') : undefined;\n const year = method.expiryYear ? String(method.expiryYear) : undefined;\n const isBank = method.type === 'BANK_TRANSFER' || method.type === 'NETBANKING';\n\n return {\n id: method.id,\n type: isBank ? 'bank' : 'card',\n name: `${account.name || 'Billing'} ${isBank ? 'Bank Account' : 'Card'}`,\n bank: method.brand || account.name || 'Billing Account',\n last4: method.last4 || '0000',\n status: method.isDefault ? 'primary' : 'active',\n expiry: month && year ? `${month}/${year}` : undefined,\n };\n });\n};\n\nconst parseGraphql = <T>(result: GraphqlResult<T>, fallbackMessage: string): T => {\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || fallbackMessage);\n }\n if (!result.data) {\n throw new Error(fallbackMessage);\n }\n return result.data;\n};\n\n// Fields that live on the client-side entity objects but are NEVER accepted by\n// any Crew* Create/Update GraphQL input — either a client-generated temp `id`,\n// a server-set timestamp, or a server-derived rollup counter. Sending them makes\n// the gateway reject the whole operation with a GraphQL validation error (which\n// the public gateway masks to a generic INTERNAL_SERVER_ERROR), so no row is\n// ever written. Stripping them centrally keeps every create/update mutation valid\n// without each caller having to hand-pick input fields. (Counters like rating /\n// applicants / viewCount that a few inputs DO accept are safe to drop too — they\n// default server-side, and the UI never lets a user set a derived rollup.)\nconst MUTATION_INPUT_OMIT_KEYS = new Set<string>([\n 'id',\n 'createdAt',\n 'createdOn',\n 'updatedAt',\n 'deletedAt',\n 'employeeCount',\n 'memberCount',\n 'projectCount',\n 'enrolled',\n 'completed',\n 'completionRate',\n 'reviews',\n 'rating',\n 'tasks',\n 'completedTasks',\n 'spent',\n 'progress',\n 'applicants',\n 'viewCount',\n 'revenue',\n 'projects',\n]);\n\nconst sanitizeMutationInput = (\n variables: Record<string, unknown> | undefined\n): Record<string, unknown> | undefined => {\n if (!variables) {\n return variables;\n }\n const input = variables.input;\n if (!input || typeof input !== 'object' || Array.isArray(input)) {\n return variables;\n }\n const cleaned: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(input as Record<string, unknown>)) {\n if (!MUTATION_INPUT_OMIT_KEYS.has(key)) {\n cleaned[key] = value;\n }\n }\n return { ...variables, input: cleaned };\n};\n\nconst runGraphql = async <T>(\n query: string,\n variables: Record<string, unknown> | undefined,\n params: InitParams,\n fallbackMessage: string,\n gateway: Gateway = 'workspace'\n) => {\n const result = await graphqlFetch<T>({\n gateway,\n query,\n variables: sanitizeMutationInput(variables),\n authToken: params.authToken,\n // `apiGatewayUrl` is the workspace gateway base (dev override only). The\n // global gateway (e.g. billing overlap) resolves its own URL from fe-libs\n // config, so never force the workspace base onto a global-gateway call.\n baseUrl: gateway === 'workspace' ? params.apiGatewayUrl : undefined,\n extraHeaders: {\n ...(gateway === 'workspace' && params.workspaceId\n ? { 'x-workspace-id': params.workspaceId }\n : {}),\n },\n });\n return parseGraphql(result as GraphqlResult<T>, fallbackMessage);\n};\n\n// Overlap queries are best-effort: they enrich the crew bootstrap with real\n// wspace/global platform data but must never block the page if a field is\n// unavailable in a given environment. Swallow to null, but surface the reason\n// in dev so schema-arg drift (the historical failure mode) is visible.\n// Vite injects `import.meta.env.DEV`, but this package's tsconfig does not pull\n// in `vite/client` ambient types — narrow through a typed shape instead of `any`.\nconst isDevEnv = (): boolean => Boolean((import.meta as { env?: { DEV?: boolean } }).env?.DEV);\n\nconst runOverlap = async <T>(\n query: string,\n variables: Record<string, unknown> | undefined,\n params: InitParams,\n fallbackMessage: string,\n gateway: Gateway = 'workspace'\n): Promise<T | null> => {\n try {\n return await runGraphql<T>(query, variables, params, fallbackMessage, gateway);\n } catch (error) {\n if (isDevEnv()) {\n console.warn(`[crewfoundry] overlap query skipped: ${fallbackMessage}`, error);\n }\n return null;\n }\n};\n\n// ── Store Interface ─────────────────────────────────────────────\ninterface CrewFoundryState {\n // Overview\n metrics: OverviewMetric[];\n workItems: WorkItem[];\n selectedView: string;\n\n // Domain data\n employees: Employee[];\n departments: Department[];\n jobPostings: JobPosting[];\n candidates: Candidate[];\n interviews: Interview[];\n courses: LearningCourse[];\n learningPaths: LearningPath[];\n marketplaceServices: MarketplaceService[];\n announcements: Announcement[];\n teams: Team[];\n projects: Project[];\n payrollRecords: PayrollRecord[];\n leaveRequests: LeaveRequest[];\n timeEntries: TimeEntry[];\n notifications: Notification[];\n paymentMethods: ExternalPaymentMethod[];\n invoices: Invoice[];\n vendors: Vendor[];\n clients: Client[];\n\n // Actions\n initialized: boolean;\n loading: boolean;\n error: string | null;\n initParams: InitParams;\n initializeData: (params: InitParams) => Promise<void>;\n setSelectedView: (view: string) => void;\n setWorkItems: (items: WorkItem[]) => void;\n addEmployee: (employee: Employee) => Promise<void>;\n updateEmployee: (id: string, updates: Partial<Employee>) => Promise<void>;\n removeEmployee: (id: string) => Promise<void>;\n addJobPosting: (job: JobPosting) => Promise<void>;\n updateJobPosting: (id: string, updates: Partial<JobPosting>) => Promise<void>;\n addCandidate: (candidate: Candidate) => Promise<void>;\n updateCandidate: (id: string, updates: Partial<Candidate>) => Promise<void>;\n removeJobPosting: (id: string) => Promise<void>;\n removeCandidate: (id: string) => Promise<void>;\n addAnnouncement: (announcement: Announcement) => Promise<void>;\n updateAnnouncement: (id: string, updates: Partial<Announcement>) => Promise<void>;\n removeAnnouncement: (id: string) => Promise<void>;\n addLeaveRequest: (request: LeaveRequest) => Promise<void>;\n updateLeaveRequest: (id: string, updates: Partial<LeaveRequest>) => Promise<void>;\n addInterview: (interview: Interview) => Promise<void>;\n updateInterview: (id: string, updates: Partial<Interview>) => Promise<void>;\n removeInterview: (id: string) => Promise<void>;\n addInvoice: (invoice: Invoice) => Promise<void>;\n updateInvoice: (id: string, updates: Partial<Invoice>) => Promise<void>;\n removeInvoice: (id: string) => Promise<void>;\n addVendor: (vendor: Vendor) => Promise<void>;\n updateVendor: (id: string, updates: Partial<Vendor>) => Promise<void>;\n removeVendor: (id: string) => Promise<void>;\n addClient: (client: Client) => Promise<void>;\n updateClient: (id: string, updates: Partial<Client>) => Promise<void>;\n removeClient: (id: string) => Promise<void>;\n addTeam: (team: Team) => Promise<void>;\n updateTeam: (id: string, updates: Partial<Team>) => Promise<void>;\n removeTeam: (id: string) => Promise<void>;\n addProject: (project: Project) => Promise<void>;\n updateProject: (id: string, updates: Partial<Project>) => Promise<void>;\n removeProject: (id: string) => Promise<void>;\n addMarketplaceService: (service: MarketplaceService) => Promise<void>;\n updateMarketplaceService: (id: string, updates: Partial<MarketplaceService>) => Promise<void>;\n removeMarketplaceService: (id: string) => Promise<void>;\n addDepartment: (department: Department) => Promise<void>;\n updateDepartment: (id: string, updates: Partial<Department>) => Promise<void>;\n removeDepartment: (id: string) => Promise<void>;\n addCourse: (course: LearningCourse) => Promise<void>;\n updateCourse: (id: string, updates: Partial<LearningCourse>) => Promise<void>;\n removeCourse: (id: string) => Promise<void>;\n enrollCourse: (id: string) => Promise<void>;\n addLearningPath: (path: LearningPath) => Promise<void>;\n updateLearningPath: (id: string, updates: Partial<LearningPath>) => Promise<void>;\n removeLearningPath: (id: string) => Promise<void>;\n addPayrollRecord: (record: PayrollRecord) => Promise<void>;\n updatePayrollRecord: (id: string, updates: Partial<PayrollRecord>) => Promise<void>;\n removePayrollRecord: (id: string) => Promise<void>;\n addTimeEntry: (entry: TimeEntry) => Promise<void>;\n updateTimeEntry: (id: string, updates: Partial<TimeEntry>) => Promise<void>;\n removeTimeEntry: (id: string) => Promise<void>;\n markNotificationRead: (id: string) => Promise<void>;\n markAllNotificationsRead: () => Promise<void>;\n}\n\nexport const useCrewFoundryStore = create<CrewFoundryState>((set) => ({\n // Overview\n metrics: [\n { label: 'Total Employees', value: '247', trend: '+5.2%' },\n { label: 'Open Positions', value: '24', trend: '+3 this week' },\n { label: 'Hiring Pipeline', value: '347', trend: '+52 applications' },\n { label: 'Employee Satisfaction', value: '4.6/5', trend: '+0.2' },\n ],\n workItems: [\n {\n id: 'w1',\n title: 'Q1 Performance Review Cycle',\n status: 'active',\n owner: 'HR',\n updatedAt: '2h ago',\n },\n {\n id: 'w2',\n title: 'New Health Benefits Enrollment',\n status: 'active',\n owner: 'Benefits',\n updatedAt: '5h ago',\n },\n {\n id: 'w3',\n title: 'Engineering Headcount Planning',\n status: 'at_risk',\n owner: 'Recruiting',\n updatedAt: '1d ago',\n },\n {\n id: 'w4',\n title: 'Employee Onboarding Automation',\n status: 'completed',\n owner: 'HR Ops',\n updatedAt: '2d ago',\n },\n ],\n selectedView: 'overview',\n initialized: false,\n loading: false,\n error: null,\n initParams: {},\n\n // Domain data\n employees: [],\n departments: [],\n jobPostings: [],\n candidates: [],\n interviews: [],\n courses: [],\n learningPaths: [],\n marketplaceServices: [],\n announcements: [],\n teams: [],\n projects: [],\n payrollRecords: [],\n leaveRequests: [],\n timeEntries: [],\n notifications: [],\n paymentMethods: [],\n invoices: [],\n vendors: [],\n clients: [],\n\n // Actions\n initializeData: async (params) => {\n if (!params.workspaceId) {\n return;\n }\n set({ loading: true, error: null, initParams: params });\n try {\n const [workspaceWithOverlapData, billingOverlap] = await Promise.all([\n runOverlap<WorkspaceBootstrapWithOverlapResponse>(\n WORKSPACE_BOOTSTRAP_WITH_OVERLAP_QUERY,\n {\n workspaceId: params.workspaceId,\n projectPagination: { limit: 50, offset: 0 },\n groupFirst: 30,\n conversationFirst: 30,\n },\n params,\n 'Unable to load workspace bootstrap with overlap data'\n ),\n // getBillingAccountsByOrg lives on the GLOBAL supergraph, not wspace —\n // route it to the global gateway (org context comes from the x-org-id\n // header the gateway auto-attaches for global-gateway calls).\n runOverlap<OverlapBillingResponse>(\n OVERLAP_BILLING_QUERY,\n undefined,\n params,\n 'Unable to load overlap billing data',\n 'global'\n ),\n ]);\n\n const bootstrap = workspaceWithOverlapData\n ? workspaceWithOverlapData.crewfoundryBootstrap\n : (\n await runGraphql<BootstrapPayload>(\n BOOTSTRAP_QUERY,\n undefined,\n params,\n 'Unable to load CrewFoundry data'\n )\n ).crewfoundryBootstrap;\n\n const overlapTeams = workspaceWithOverlapData\n ? mapOverlapTeams(workspaceWithOverlapData.groups.edges)\n : [];\n const overlapProjects = workspaceWithOverlapData\n ? mapOverlapProjects(workspaceWithOverlapData.projects.items, overlapTeams)\n : [];\n const overlapNotifications = workspaceWithOverlapData\n ? mapConversationNotifications(workspaceWithOverlapData.conversations.edges)\n : [];\n\n const teams = overlapTeams.length > 0 ? overlapTeams : bootstrap.teams;\n const projects = overlapProjects.length > 0 ? overlapProjects : bootstrap.projects;\n const notifications =\n overlapNotifications.length > 0\n ? mergeNotifications(bootstrap.notifications, overlapNotifications)\n : bootstrap.notifications;\n const paymentMethods = billingOverlap ? mapBillingMethods(billingOverlap) : [];\n\n set({\n employees: bootstrap.employees,\n departments: bootstrap.departments,\n jobPostings: bootstrap.jobPostings,\n candidates: bootstrap.candidates,\n interviews: bootstrap.interviews,\n courses: bootstrap.courses,\n learningPaths: bootstrap.learningPaths,\n marketplaceServices: bootstrap.marketplaceServices,\n announcements: bootstrap.announcements,\n teams,\n projects,\n payrollRecords: bootstrap.payrollRecords,\n leaveRequests: bootstrap.leaveRequests,\n timeEntries: bootstrap.timeEntries,\n notifications,\n paymentMethods,\n invoices: bootstrap.invoices,\n vendors: bootstrap.vendors,\n clients: bootstrap.clients,\n metrics: [\n { label: 'Total Employees', value: String(bootstrap.employees.length), trend: 'Live' },\n {\n label: 'Open Positions',\n value: String(bootstrap.jobPostings.filter((j) => j.status === 'active').length),\n trend: 'Live',\n },\n { label: 'Hiring Pipeline', value: String(bootstrap.candidates.length), trend: 'Live' },\n {\n label: 'Cross-Team Projects',\n value: String(projects.filter((project) => project.status === 'active').length),\n trend: 'Live',\n },\n ],\n initialized: true,\n loading: false,\n });\n } catch (error) {\n set({\n error: error instanceof Error ? error.message : 'Unable to load CrewFoundry data',\n loading: false,\n });\n }\n },\n setSelectedView: (view) => set({ selectedView: view }),\n setWorkItems: (items) => set({ workItems: items }),\n addEmployee: async (employee) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewEmployee: Employee }>(\n CREATE_EMPLOYEE_MUTATION,\n {\n input: {\n ...employee,\n status: normalizeStatus(employee.status),\n type: normalizeStatus(employee.type),\n },\n },\n params,\n 'Unable to create employee'\n );\n set((state) => ({ employees: [data.createCrewEmployee, ...state.employees] }));\n },\n updateEmployee: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const payload = {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n ...(updates.type ? { type: normalizeStatus(updates.type) } : {}),\n };\n const data = await runGraphql<{ updateCrewEmployee: Employee }>(\n UPDATE_EMPLOYEE_MUTATION,\n { id, input: payload },\n params,\n 'Unable to update employee'\n );\n set((state) => ({\n employees: state.employees.map((e) => (e.id === id ? data.updateCrewEmployee : e)),\n }));\n },\n removeEmployee: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewEmployee: boolean }>(\n REMOVE_EMPLOYEE_MUTATION,\n { id },\n params,\n 'Unable to remove employee'\n );\n set((state) => ({ employees: state.employees.filter((e) => e.id !== id) }));\n },\n addJobPosting: async (job) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewJobPosting: JobPosting }>(\n CREATE_JOB_MUTATION,\n {\n input: {\n ...job,\n status: normalizeStatus(job.status),\n },\n },\n params,\n 'Unable to create job posting'\n );\n set((state) => ({ jobPostings: [data.createCrewJobPosting, ...state.jobPostings] }));\n },\n updateJobPosting: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewJobPosting: JobPosting }>(\n UPDATE_JOB_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update job posting'\n );\n set((state) => ({\n jobPostings: state.jobPostings.map((j) => (j.id === id ? data.updateCrewJobPosting : j)),\n }));\n },\n addCandidate: async (candidate) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewCandidate: Candidate }>(\n CREATE_CANDIDATE_MUTATION,\n { input: { ...candidate, status: normalizeStatus(candidate.status) } },\n params,\n 'Unable to create candidate'\n );\n set((state) => ({ candidates: [data.createCrewCandidate, ...state.candidates] }));\n },\n updateCandidate: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewCandidate: Candidate }>(\n UPDATE_CANDIDATE_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update candidate'\n );\n set((state) => ({\n candidates: state.candidates.map((c) => (c.id === id ? data.updateCrewCandidate : c)),\n }));\n },\n addAnnouncement: async (announcement) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewAnnouncement: Announcement }>(\n CREATE_ANNOUNCEMENT_MUTATION,\n { input: announcement },\n params,\n 'Unable to create announcement'\n );\n set((state) => ({ announcements: [data.createCrewAnnouncement, ...state.announcements] }));\n },\n addLeaveRequest: async (request) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewLeaveRequest: LeaveRequest }>(\n CREATE_LEAVE_MUTATION,\n {\n input: {\n ...request,\n type: normalizeStatus(request.type),\n status: normalizeStatus(request.status),\n },\n },\n params,\n 'Unable to create leave request'\n );\n set((state) => ({ leaveRequests: [data.createCrewLeaveRequest, ...state.leaveRequests] }));\n },\n updateLeaveRequest: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewLeaveRequest: LeaveRequest }>(\n UPDATE_LEAVE_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.type ? { type: normalizeStatus(updates.type) } : {}),\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update leave request'\n );\n set((state) => ({\n leaveRequests: state.leaveRequests.map((l) =>\n l.id === id ? data.updateCrewLeaveRequest : l\n ),\n }));\n },\n markNotificationRead: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ markCrewNotificationRead: boolean }>(\n MARK_NOTIFICATION_MUTATION,\n { id },\n params,\n 'Unable to update notification'\n );\n set((state) => ({\n notifications: state.notifications.map((n) => (n.id === id ? { ...n, read: true } : n)),\n }));\n },\n markAllNotificationsRead: async () => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ markAllCrewNotificationsRead: boolean }>(\n MARK_ALL_NOTIFICATIONS_MUTATION,\n undefined,\n params,\n 'Unable to update notifications'\n );\n set((state) => ({ notifications: state.notifications.map((n) => ({ ...n, read: true })) }));\n },\n\n // ── Extra removes for existing entities ───────────────────────\n removeJobPosting: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewJobPosting: boolean }>(\n REMOVE_JOB_MUTATION,\n { id },\n params,\n 'Unable to remove job posting'\n );\n set((state) => ({ jobPostings: state.jobPostings.filter((j) => j.id !== id) }));\n },\n removeCandidate: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewCandidate: boolean }>(\n REMOVE_CANDIDATE_MUTATION,\n { id },\n params,\n 'Unable to remove candidate'\n );\n set((state) => ({ candidates: state.candidates.filter((c) => c.id !== id) }));\n },\n updateAnnouncement: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewAnnouncement: Announcement }>(\n UPDATE_ANNOUNCEMENT_MUTATION,\n { id, input: updates },\n params,\n 'Unable to update announcement'\n );\n set((state) => ({\n announcements: state.announcements.map((a) =>\n a.id === id ? data.updateCrewAnnouncement : a\n ),\n }));\n },\n removeAnnouncement: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewAnnouncement: boolean }>(\n REMOVE_ANNOUNCEMENT_MUTATION,\n { id },\n params,\n 'Unable to remove announcement'\n );\n set((state) => ({ announcements: state.announcements.filter((a) => a.id !== id) }));\n },\n\n // ── Interview (enum: type, status) ────────────────────────────\n addInterview: async (interview) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewInterview: Interview }>(\n CREATE_INTERVIEW_MUTATION,\n {\n input: {\n ...interview,\n type: normalizeStatus(interview.type),\n status: normalizeStatus(interview.status),\n },\n },\n params,\n 'Unable to schedule interview'\n );\n set((state) => ({ interviews: [data.createCrewInterview, ...state.interviews] }));\n },\n updateInterview: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewInterview: Interview }>(\n UPDATE_INTERVIEW_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.type ? { type: normalizeStatus(updates.type) } : {}),\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update interview'\n );\n set((state) => ({\n interviews: state.interviews.map((i) => (i.id === id ? data.updateCrewInterview : i)),\n }));\n },\n removeInterview: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewInterview: boolean }>(\n REMOVE_INTERVIEW_MUTATION,\n { id },\n params,\n 'Unable to remove interview'\n );\n set((state) => ({ interviews: state.interviews.filter((i) => i.id !== id) }));\n },\n\n // ── Invoice (enum: status) ────────────────────────────────────\n addInvoice: async (invoice) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewInvoice: Invoice }>(\n CREATE_INVOICE_MUTATION,\n { input: { ...invoice, status: normalizeStatus(invoice.status) } },\n params,\n 'Unable to create invoice'\n );\n set((state) => ({ invoices: [data.createCrewInvoice, ...state.invoices] }));\n },\n updateInvoice: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewInvoice: Invoice }>(\n UPDATE_INVOICE_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update invoice'\n );\n set((state) => ({\n invoices: state.invoices.map((i) => (i.id === id ? data.updateCrewInvoice : i)),\n }));\n },\n removeInvoice: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewInvoice: boolean }>(\n REMOVE_INVOICE_MUTATION,\n { id },\n params,\n 'Unable to remove invoice'\n );\n set((state) => ({ invoices: state.invoices.filter((i) => i.id !== id) }));\n },\n\n // ── Vendor (enum: status) ─────────────────────────────────────\n addVendor: async (vendor) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewVendor: Vendor }>(\n CREATE_VENDOR_MUTATION,\n { input: { ...vendor, status: normalizeStatus(vendor.status) } },\n params,\n 'Unable to create vendor'\n );\n set((state) => ({ vendors: [data.createCrewVendor, ...state.vendors] }));\n },\n updateVendor: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewVendor: Vendor }>(\n UPDATE_VENDOR_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update vendor'\n );\n set((state) => ({\n vendors: state.vendors.map((v) => (v.id === id ? data.updateCrewVendor : v)),\n }));\n },\n removeVendor: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewVendor: boolean }>(\n REMOVE_VENDOR_MUTATION,\n { id },\n params,\n 'Unable to remove vendor'\n );\n set((state) => ({ vendors: state.vendors.filter((v) => v.id !== id) }));\n },\n\n // ── Client (enum: status; `since`) ────────────────────────────\n addClient: async (client) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewClient: Client }>(\n CREATE_CLIENT_MUTATION,\n { input: { ...client, status: normalizeStatus(client.status) } },\n params,\n 'Unable to create client'\n );\n set((state) => ({ clients: [data.createCrewClient, ...state.clients] }));\n },\n updateClient: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewClient: Client }>(\n UPDATE_CLIENT_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update client'\n );\n set((state) => ({\n clients: state.clients.map((c) => (c.id === id ? data.updateCrewClient : c)),\n }));\n },\n removeClient: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewClient: boolean }>(\n REMOVE_CLIENT_MUTATION,\n { id },\n params,\n 'Unable to remove client'\n );\n set((state) => ({ clients: state.clients.filter((c) => c.id !== id) }));\n },\n\n // ── Team (plain status; not normalized) ───────────────────────\n addTeam: async (team) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewTeam: Team }>(\n CREATE_TEAM_MUTATION,\n { input: team },\n params,\n 'Unable to create team'\n );\n set((state) => ({ teams: [data.createCrewTeam, ...state.teams] }));\n },\n updateTeam: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewTeam: Team }>(\n UPDATE_TEAM_MUTATION,\n { id, input: updates },\n params,\n 'Unable to update team'\n );\n set((state) => ({\n teams: state.teams.map((t) => (t.id === id ? data.updateCrewTeam : t)),\n }));\n },\n removeTeam: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewTeam: boolean }>(\n REMOVE_TEAM_MUTATION,\n { id },\n params,\n 'Unable to remove team'\n );\n set((state) => ({ teams: state.teams.filter((t) => t.id !== id) }));\n },\n\n // ── Project (enum: status, priority) ──────────────────────────\n addProject: async (project) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewProject: Project }>(\n CREATE_PROJECT_MUTATION,\n {\n input: {\n ...project,\n status: normalizeStatus(project.status),\n priority: normalizeStatus(project.priority),\n },\n },\n params,\n 'Unable to create project'\n );\n set((state) => ({ projects: [data.createCrewProject, ...state.projects] }));\n },\n updateProject: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewProject: Project }>(\n UPDATE_PROJECT_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n ...(updates.priority ? { priority: normalizeStatus(updates.priority) } : {}),\n },\n },\n params,\n 'Unable to update project'\n );\n set((state) => ({\n projects: state.projects.map((p) => (p.id === id ? data.updateCrewProject : p)),\n }));\n },\n removeProject: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewProject: boolean }>(\n REMOVE_PROJECT_MUTATION,\n { id },\n params,\n 'Unable to remove project'\n );\n set((state) => ({ projects: state.projects.filter((p) => p.id !== id) }));\n },\n\n // ── MarketplaceService (enum: status) ─────────────────────────\n addMarketplaceService: async (service) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewMarketplaceService: MarketplaceService }>(\n CREATE_MARKETPLACE_SERVICE_MUTATION,\n { input: { ...service, status: normalizeStatus(service.status) } },\n params,\n 'Unable to create service'\n );\n set((state) => ({\n marketplaceServices: [data.createCrewMarketplaceService, ...state.marketplaceServices],\n }));\n },\n updateMarketplaceService: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewMarketplaceService: MarketplaceService }>(\n UPDATE_MARKETPLACE_SERVICE_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update service'\n );\n set((state) => ({\n marketplaceServices: state.marketplaceServices.map((s) =>\n s.id === id ? data.updateCrewMarketplaceService : s\n ),\n }));\n },\n removeMarketplaceService: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewMarketplaceService: boolean }>(\n REMOVE_MARKETPLACE_SERVICE_MUTATION,\n { id },\n params,\n 'Unable to remove service'\n );\n set((state) => ({\n marketplaceServices: state.marketplaceServices.filter((s) => s.id !== id),\n }));\n },\n\n // ── Department (plain status; not normalized) ─────────────────\n addDepartment: async (department) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewDepartment: Department }>(\n CREATE_DEPARTMENT_MUTATION,\n { input: department },\n params,\n 'Unable to create department'\n );\n set((state) => ({ departments: [data.createCrewDepartment, ...state.departments] }));\n },\n updateDepartment: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewDepartment: Department }>(\n UPDATE_DEPARTMENT_MUTATION,\n { id, input: updates },\n params,\n 'Unable to update department'\n );\n set((state) => ({\n departments: state.departments.map((d) => (d.id === id ? data.updateCrewDepartment : d)),\n }));\n },\n removeDepartment: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewDepartment: boolean }>(\n REMOVE_DEPARTMENT_MUTATION,\n { id },\n params,\n 'Unable to remove department'\n );\n set((state) => ({ departments: state.departments.filter((d) => d.id !== id) }));\n },\n\n // ── Course (LearningCourse; plain status) + enroll ────────────\n addCourse: async (course) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewCourse: LearningCourse }>(\n CREATE_COURSE_MUTATION,\n { input: course },\n params,\n 'Unable to create course'\n );\n set((state) => ({ courses: [data.createCrewCourse, ...state.courses] }));\n },\n updateCourse: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewCourse: LearningCourse }>(\n UPDATE_COURSE_MUTATION,\n { id, input: updates },\n params,\n 'Unable to update course'\n );\n set((state) => ({\n courses: state.courses.map((c) => (c.id === id ? data.updateCrewCourse : c)),\n }));\n },\n removeCourse: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewCourse: boolean }>(\n REMOVE_COURSE_MUTATION,\n { id },\n params,\n 'Unable to remove course'\n );\n set((state) => ({ courses: state.courses.filter((c) => c.id !== id) }));\n },\n enrollCourse: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ enrollCrewCourse: LearningCourse }>(\n ENROLL_COURSE_MUTATION,\n { id },\n params,\n 'Unable to enroll in course'\n );\n set((state) => ({\n courses: state.courses.map((c) => (c.id === id ? data.enrollCrewCourse : c)),\n }));\n },\n\n // ── LearningPath (plain; not normalized) ──────────────────────\n addLearningPath: async (path) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewLearningPath: LearningPath }>(\n CREATE_LEARNING_PATH_MUTATION,\n { input: path },\n params,\n 'Unable to create learning path'\n );\n set((state) => ({ learningPaths: [data.createCrewLearningPath, ...state.learningPaths] }));\n },\n updateLearningPath: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewLearningPath: LearningPath }>(\n UPDATE_LEARNING_PATH_MUTATION,\n { id, input: updates },\n params,\n 'Unable to update learning path'\n );\n set((state) => ({\n learningPaths: state.learningPaths.map((l) =>\n l.id === id ? data.updateCrewLearningPath : l\n ),\n }));\n },\n removeLearningPath: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewLearningPath: boolean }>(\n REMOVE_LEARNING_PATH_MUTATION,\n { id },\n params,\n 'Unable to remove learning path'\n );\n set((state) => ({ learningPaths: state.learningPaths.filter((l) => l.id !== id) }));\n },\n\n // ── PayrollRecord (enum: status) ──────────────────────────────\n addPayrollRecord: async (record) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewPayrollRecord: PayrollRecord }>(\n CREATE_PAYROLL_MUTATION,\n { input: { ...record, status: normalizeStatus(record.status) } },\n params,\n 'Unable to create payroll record'\n );\n set((state) => ({ payrollRecords: [data.createCrewPayrollRecord, ...state.payrollRecords] }));\n },\n updatePayrollRecord: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewPayrollRecord: PayrollRecord }>(\n UPDATE_PAYROLL_MUTATION,\n {\n id,\n input: {\n ...updates,\n ...(updates.status ? { status: normalizeStatus(updates.status) } : {}),\n },\n },\n params,\n 'Unable to update payroll record'\n );\n set((state) => ({\n payrollRecords: state.payrollRecords.map((p) =>\n p.id === id ? data.updateCrewPayrollRecord : p\n ),\n }));\n },\n removePayrollRecord: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewPayrollRecord: boolean }>(\n REMOVE_PAYROLL_MUTATION,\n { id },\n params,\n 'Unable to remove payroll record'\n );\n set((state) => ({ payrollRecords: state.payrollRecords.filter((p) => p.id !== id) }));\n },\n\n // ── TimeEntry (plain status; not normalized) ──────────────────\n addTimeEntry: async (entry) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ createCrewTimeEntry: TimeEntry }>(\n CREATE_TIME_ENTRY_MUTATION,\n { input: entry },\n params,\n 'Unable to create time entry'\n );\n set((state) => ({ timeEntries: [data.createCrewTimeEntry, ...state.timeEntries] }));\n },\n updateTimeEntry: async (id, updates) => {\n const params = useCrewFoundryStore.getState().initParams;\n const data = await runGraphql<{ updateCrewTimeEntry: TimeEntry }>(\n UPDATE_TIME_ENTRY_MUTATION,\n { id, input: updates },\n params,\n 'Unable to update time entry'\n );\n set((state) => ({\n timeEntries: state.timeEntries.map((t) => (t.id === id ? data.updateCrewTimeEntry : t)),\n }));\n },\n removeTimeEntry: async (id) => {\n const params = useCrewFoundryStore.getState().initParams;\n await runGraphql<{ removeCrewTimeEntry: boolean }>(\n REMOVE_TIME_ENTRY_MUTATION,\n { id },\n params,\n 'Unable to remove time entry'\n );\n set((state) => ({ timeEntries: state.timeEntries.filter((t) => t.id !== id) }));\n },\n}));\n"],"mappings":";;;AA8RA,IAAM,IAAkB,onEAyBlB,IAAyC,o/FAsEzC,IAAwB,kRAmBxB,IAA2B,yOAC3B,IAA2B,4PAC3B,IAA2B,yEAC3B,IAAsB,+PACtB,IAAsB,kRACtB,IAA4B,2OAC5B,IAA4B,8PAC5B,IAA+B,8M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