@burdenoff/microfe-crewfoundry 2026.608.1 → 2026.624.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/crewfoundry/pages/AdminAdminPagePage.js +15 -15
- package/dist/crewfoundry/pages/AdminAdminPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsAnalyticsPagePage.js +15 -15
- package/dist/crewfoundry/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.js +17 -17
- package/dist/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js +19 -19
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js +16 -16
- package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +5 -5
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js +7 -7
- package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsDirectoryPagePage.js +7 -7
- package/dist/crewfoundry/pages/CommunicationsDirectoryPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsFilesPagePage.js +7 -7
- package/dist/crewfoundry/pages/CommunicationsFilesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js +7 -7
- package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js +3 -3
- package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js +8 -8
- package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +8 -8
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyCompanyDashboardPagePage.js +14 -14
- package/dist/crewfoundry/pages/CompanyCompanyDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js +10 -10
- package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +4 -4
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js +17 -17
- package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js +19 -19
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js +17 -17
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardExecutiveDashboardPage.js +12 -12
- package/dist/crewfoundry/pages/DashboardExecutiveDashboardPage.js.map +1 -1
- package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js +12 -12
- package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringApplicationsPagePage.js +11 -11
- package/dist/crewfoundry/pages/HiringApplicationsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +7 -7
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCreateJobPagePage.js +1 -1
- package/dist/crewfoundry/pages/HiringCreateJobPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +7 -7
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +13 -13
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobsPagePage.js +7 -7
- package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +10 -10
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrEmployeesPagePage.js +9 -9
- package/dist/crewfoundry/pages/HrEmployeesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +13 -13
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrPayrollPagePage.js +10 -10
- package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +9 -9
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js +3 -3
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.js +2 -2
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js +11 -11
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js +7 -7
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js +4 -4
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.js +9 -9
- package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPagePage.js +10 -10
- package/dist/crewfoundry/pages/LearningLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +11 -11
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js +5 -5
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningMyLearningPagePage.js +7 -7
- package/dist/crewfoundry/pages/LearningMyLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js +3 -3
- package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js +7 -7
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js +11 -11
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js +11 -11
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js +6 -6
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js +6 -6
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.js +7 -7
- package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js +2 -2
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js +15 -15
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js +10 -10
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsEscrowPagePage.js +5 -5
- package/dist/crewfoundry/pages/PaymentsEscrowPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js +6 -6
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js +6 -6
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js +4 -4
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsSecurityPagePage.js +4 -4
- package/dist/crewfoundry/pages/PaymentsSecurityPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsCreateProjectPagePage.js +1 -1
- package/dist/crewfoundry/pages/ProjectsCreateProjectPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js +15 -15
- package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js +4 -4
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js +8 -8
- package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js +14 -14
- package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js +6 -6
- package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js +20 -20
- package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js +3 -3
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ function h() {
|
|
|
14
14
|
className: "text-2xl font-semibold",
|
|
15
15
|
children: "Time Tracking"
|
|
16
16
|
}), /* @__PURE__ */ o("p", {
|
|
17
|
-
className: "text-sm text-
|
|
17
|
+
className: "text-sm text-text-secondary",
|
|
18
18
|
children: "Monitor employee work hours and overtime"
|
|
19
19
|
})] }), /* @__PURE__ */ s(l, {
|
|
20
20
|
size: "sm",
|
|
@@ -29,12 +29,12 @@ function h() {
|
|
|
29
29
|
children: [/* @__PURE__ */ o(m, {
|
|
30
30
|
className: "text-sm font-medium",
|
|
31
31
|
children: "Total Hours"
|
|
32
|
-
}), /* @__PURE__ */ o(n, { className: "h-4 w-4 text-
|
|
32
|
+
}), /* @__PURE__ */ o(n, { className: "h-4 w-4 text-text-secondary" })]
|
|
33
33
|
}), /* @__PURE__ */ s(d, { children: [/* @__PURE__ */ o("div", {
|
|
34
34
|
className: "text-2xl font-bold",
|
|
35
35
|
children: g.toFixed(1)
|
|
36
36
|
}), /* @__PURE__ */ o("p", {
|
|
37
|
-
className: "text-xs text-
|
|
37
|
+
className: "text-xs text-text-secondary",
|
|
38
38
|
children: "Today"
|
|
39
39
|
})] })] }),
|
|
40
40
|
/* @__PURE__ */ s(u, { children: [/* @__PURE__ */ s(p, {
|
|
@@ -47,7 +47,7 @@ function h() {
|
|
|
47
47
|
className: "text-2xl font-bold",
|
|
48
48
|
children: [_.toFixed(1), "h"]
|
|
49
49
|
}), /* @__PURE__ */ o("p", {
|
|
50
|
-
className: "text-xs text-
|
|
50
|
+
className: "text-xs text-text-secondary",
|
|
51
51
|
children: "Extra hours logged"
|
|
52
52
|
})] })] }),
|
|
53
53
|
/* @__PURE__ */ s(u, { children: [/* @__PURE__ */ s(p, {
|
|
@@ -60,7 +60,7 @@ function h() {
|
|
|
60
60
|
className: "text-2xl font-bold",
|
|
61
61
|
children: v
|
|
62
62
|
}), /* @__PURE__ */ o("p", {
|
|
63
|
-
className: "text-xs text-
|
|
63
|
+
className: "text-xs text-text-secondary",
|
|
64
64
|
children: "time entries"
|
|
65
65
|
})] })] }),
|
|
66
66
|
/* @__PURE__ */ s(u, { children: [/* @__PURE__ */ s(p, {
|
|
@@ -73,7 +73,7 @@ function h() {
|
|
|
73
73
|
className: "text-2xl font-bold",
|
|
74
74
|
children: y
|
|
75
75
|
}), /* @__PURE__ */ o("p", {
|
|
76
|
-
className: "text-xs text-
|
|
76
|
+
className: "text-xs text-text-secondary",
|
|
77
77
|
children: "awaiting approval"
|
|
78
78
|
})] })] })
|
|
79
79
|
]
|
|
@@ -90,9 +90,9 @@ function h() {
|
|
|
90
90
|
children: e
|
|
91
91
|
}),
|
|
92
92
|
/* @__PURE__ */ o("div", {
|
|
93
|
-
className: "flex-1 h-4 bg-
|
|
93
|
+
className: "flex-1 h-4 bg-bg-sunken rounded overflow-hidden",
|
|
94
94
|
children: /* @__PURE__ */ o("div", {
|
|
95
|
-
className: "h-4 bg-primary rounded",
|
|
95
|
+
className: "h-4 bg-action-primary-bg rounded",
|
|
96
96
|
style: { width: `${Math.round(t / x * 100)}%` }
|
|
97
97
|
})
|
|
98
98
|
}),
|
|
@@ -110,7 +110,7 @@ function h() {
|
|
|
110
110
|
className: "text-sm font-medium",
|
|
111
111
|
children: e.employeeName
|
|
112
112
|
}), /* @__PURE__ */ o("p", {
|
|
113
|
-
className: "text-xs text-
|
|
113
|
+
className: "text-xs text-text-secondary",
|
|
114
114
|
children: e.project
|
|
115
115
|
})] }), /* @__PURE__ */ s("div", {
|
|
116
116
|
className: "flex items-center gap-3",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HrTimeTrackingPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/HrTimeTrackingPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Button,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from '@burdenoff/fe-libs/ui';\nimport { CheckCircle, Clock, LogIn, LogOut, Timer } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function HrTimeTrackingPagePage() {\n const { timeEntries } = useCrewFoundryStore();\n\n const totalHours = timeEntries.reduce((s, t) => s + t.totalHours, 0);\n const totalOvertime = timeEntries.reduce((s, t) => s + t.overtime, 0);\n const approvedEntries = timeEntries.filter((t) => t.status === 'approved').length;\n const pendingEntries = timeEntries.filter((t) => t.status === 'pending').length;\n\n const projectBreakdown = timeEntries.reduce<Record<string, number>>((acc, t) => {\n acc[t.project] = (acc[t.project] || 0) + t.totalHours;\n return acc;\n }, {});\n const maxProjectHours = Math.max(...Object.values(projectBreakdown));\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Time Tracking</h1>\n <p className=\"text-sm text-muted-foreground\">Monitor employee work hours and overtime</p>\n </div>\n <Button size=\"sm\">\n <Timer className=\"h-4 w-4 mr-1\" />\n Clock In\n </Button>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Total Hours</CardTitle>\n <Clock className=\"h-4 w-4 text-muted-foreground\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{totalHours.toFixed(1)}</div>\n <p className=\"text-xs text-muted-foreground\">Today</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Overtime</CardTitle>\n <Timer className=\"h-4 w-4 text-orange-500\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{totalOvertime.toFixed(1)}h</div>\n <p className=\"text-xs text-muted-foreground\">Extra hours logged</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Approved</CardTitle>\n <CheckCircle className=\"h-4 w-4 text-green-500\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{approvedEntries}</div>\n <p className=\"text-xs text-muted-foreground\">time entries</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Pending</CardTitle>\n <Clock className=\"h-4 w-4 text-yellow-500\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{pendingEntries}</div>\n <p className=\"text-xs text-muted-foreground\">awaiting approval</p>\n </CardContent>\n </Card>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2\">\n <Card>\n <CardHeader>\n <CardTitle>Hours by Project</CardTitle>\n <CardDescription>Time allocation across active projects</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {Object.entries(projectBreakdown)\n .sort(([, a], [, b]) => b - a)\n .map(([project, hours]) => (\n <div key={project} className=\"flex items-center gap-3\">\n <span className=\"w-48 text-sm truncate\">{project}</span>\n <div className=\"flex-1 h-4 bg-muted rounded overflow-hidden\">\n <div\n className=\"h-4 bg-primary rounded\"\n style={{ width: `${Math.round((hours / maxProjectHours) * 100)}%` }}\n />\n </div>\n <span className=\"text-sm font-medium w-14 text-right\">{hours.toFixed(1)}h</span>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>Today's Activity</CardTitle>\n <CardDescription>Employee clock-in/out for today</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {timeEntries.map((entry) => (\n <div key={entry.id} className=\"flex items-center justify-between rounded border p-3\">\n <div>\n <p className=\"text-sm font-medium\">{entry.employeeName}</p>\n <p className=\"text-xs text-muted-foreground\">{entry.project}</p>\n </div>\n <div className=\"flex items-center gap-3\">\n <div className=\"text-right text-xs\">\n <div className=\"flex items-center gap-1\">\n <LogIn className=\"h-3 w-3 text-green-500\" />\n {entry.clockIn}\n </div>\n <div className=\"flex items-center gap-1\">\n <LogOut className=\"h-3 w-3 text-red-500\" />\n {entry.clockOut}\n </div>\n </div>\n <div className=\"text-right\">\n <p className=\"text-sm font-medium\">{entry.totalHours}h</p>\n {entry.overtime > 0 && (\n <p className=\"text-xs text-orange-600\">+{entry.overtime}h OT</p>\n )}\n </div>\n <Badge\n variant={entry.status === 'approved' ? 'default' : 'secondary'}\n className=\"text-[10px]\"\n >\n {entry.status}\n </Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;AAYA,SAAgB,IAAyB;CACvC,IAAM,EAAE,mBAAgB,GAAqB,EAEvC,IAAa,EAAY,QAAQ,GAAG,MAAM,IAAI,EAAE,YAAY,EAAE,EAC9D,IAAgB,EAAY,QAAQ,GAAG,MAAM,IAAI,EAAE,UAAU,EAAE,EAC/D,IAAkB,EAAY,QAAQ,MAAM,EAAE,WAAW,WAAW,CAAC,QACrE,IAAiB,EAAY,QAAQ,MAAM,EAAE,WAAW,UAAU,CAAC,QAEnE,IAAmB,EAAY,QAAgC,GAAK,OACxE,EAAI,EAAE,YAAY,EAAI,EAAE,YAAY,KAAK,EAAE,YACpC,IACN,EAAE,CAAC,EACA,IAAkB,KAAK,IAAI,GAAG,OAAO,OAAO,EAAiB,CAAC;AAEpE,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eAAyB;KAAkB,CAAA,EACzD,kBAAC,KAAD;KAAG,WAAU;eAAgC;KAA4C,CAAA,CACrF,EAAA,CAAA,EACN,kBAAC,GAAD;KAAQ,MAAK;eAAb,CACE,kBAAC,GAAD,EAAO,WAAU,gB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A9B,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;OAAG,WAAU;iBAAuB,EAAM;OAAiB,CAAA,EAC3D,kBAAC,KAAD;OAAG,WAAU;iBAAiC,EAAM;OAAY,CAAA,CAC5D,EAAA,CAAA,EACN,kBAAC,OAAD;OAAK,WAAU;iBAAf;QACE,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,OAAD;UAAK,WAAU;oBAAf,CACE,kBAAC,GAAD,EAAO,WAAU,0BAA2B,CAAA,EAC3C,EAAM,QACH;aACN,kBAAC,OAAD;UAAK,WAAU;oBAAf,CACE,kBAAC,GAAD,EAAQ,WAAU,wBAAyB,CAAA,EAC1C,EAAM,SACH;YACF;;QACN,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,KAAD;UAAG,WAAU;oBAAb,CAAoC,EAAM,YAAW,IAAK;aACzD,EAAM,WAAW,KAChB,kBAAC,KAAD;UAAG,WAAU;oBAAb;WAAuC;WAAE,EAAM;WAAS;WAAQ;YAE9D;;QACN,kBAAC,GAAD;SACE,SAAS,EAAM,WAAW,aAAa,YAAY;SACnD,WAAU;mBAET,EAAM;SACD,CAAA;QACJ;SACF;QA7BI,EAAM,GA6BV,CACN;KACU,CAAA,CACT,EAAA,CAAA,CACH;;GACF"}
|
|
1
|
+
{"version":3,"file":"HrTimeTrackingPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/HrTimeTrackingPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Button,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from '@burdenoff/fe-libs/ui';\nimport { CheckCircle, Clock, LogIn, LogOut, Timer } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function HrTimeTrackingPagePage() {\n const { timeEntries } = useCrewFoundryStore();\n\n const totalHours = timeEntries.reduce((s, t) => s + t.totalHours, 0);\n const totalOvertime = timeEntries.reduce((s, t) => s + t.overtime, 0);\n const approvedEntries = timeEntries.filter((t) => t.status === 'approved').length;\n const pendingEntries = timeEntries.filter((t) => t.status === 'pending').length;\n\n const projectBreakdown = timeEntries.reduce<Record<string, number>>((acc, t) => {\n acc[t.project] = (acc[t.project] || 0) + t.totalHours;\n return acc;\n }, {});\n const maxProjectHours = Math.max(...Object.values(projectBreakdown));\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Time Tracking</h1>\n <p className=\"text-sm text-text-secondary\">Monitor employee work hours and overtime</p>\n </div>\n <Button size=\"sm\">\n <Timer className=\"h-4 w-4 mr-1\" />\n Clock In\n </Button>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Total Hours</CardTitle>\n <Clock className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{totalHours.toFixed(1)}</div>\n <p className=\"text-xs text-text-secondary\">Today</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Overtime</CardTitle>\n <Timer className=\"h-4 w-4 text-orange-500\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{totalOvertime.toFixed(1)}h</div>\n <p className=\"text-xs text-text-secondary\">Extra hours logged</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Approved</CardTitle>\n <CheckCircle className=\"h-4 w-4 text-green-500\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{approvedEntries}</div>\n <p className=\"text-xs text-text-secondary\">time entries</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Pending</CardTitle>\n <Clock className=\"h-4 w-4 text-yellow-500\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{pendingEntries}</div>\n <p className=\"text-xs text-text-secondary\">awaiting approval</p>\n </CardContent>\n </Card>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2\">\n <Card>\n <CardHeader>\n <CardTitle>Hours by Project</CardTitle>\n <CardDescription>Time allocation across active projects</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {Object.entries(projectBreakdown)\n .sort(([, a], [, b]) => b - a)\n .map(([project, hours]) => (\n <div key={project} className=\"flex items-center gap-3\">\n <span className=\"w-48 text-sm truncate\">{project}</span>\n <div className=\"flex-1 h-4 bg-bg-sunken rounded overflow-hidden\">\n <div\n className=\"h-4 bg-action-primary-bg rounded\"\n style={{ width: `${Math.round((hours / maxProjectHours) * 100)}%` }}\n />\n </div>\n <span className=\"text-sm font-medium w-14 text-right\">{hours.toFixed(1)}h</span>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>Today's Activity</CardTitle>\n <CardDescription>Employee clock-in/out for today</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {timeEntries.map((entry) => (\n <div key={entry.id} className=\"flex items-center justify-between rounded border p-3\">\n <div>\n <p className=\"text-sm font-medium\">{entry.employeeName}</p>\n <p className=\"text-xs text-text-secondary\">{entry.project}</p>\n </div>\n <div className=\"flex items-center gap-3\">\n <div className=\"text-right text-xs\">\n <div className=\"flex items-center gap-1\">\n <LogIn className=\"h-3 w-3 text-green-500\" />\n {entry.clockIn}\n </div>\n <div className=\"flex items-center gap-1\">\n <LogOut className=\"h-3 w-3 text-red-500\" />\n {entry.clockOut}\n </div>\n </div>\n <div className=\"text-right\">\n <p className=\"text-sm font-medium\">{entry.totalHours}h</p>\n {entry.overtime > 0 && (\n <p className=\"text-xs text-orange-600\">+{entry.overtime}h OT</p>\n )}\n </div>\n <Badge\n variant={entry.status === 'approved' ? 'default' : 'secondary'}\n className=\"text-[10px]\"\n >\n {entry.status}\n </Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;AAYA,SAAgB,IAAyB;CACvC,IAAM,EAAE,mBAAgB,GAAqB,EAEvC,IAAa,EAAY,QAAQ,GAAG,MAAM,IAAI,EAAE,YAAY,EAAE,EAC9D,IAAgB,EAAY,QAAQ,GAAG,MAAM,IAAI,EAAE,UAAU,EAAE,EAC/D,IAAkB,EAAY,QAAQ,MAAM,EAAE,WAAW,WAAW,CAAC,QACrE,IAAiB,EAAY,QAAQ,MAAM,EAAE,WAAW,UAAU,CAAC,QAEnE,IAAmB,EAAY,QAAgC,GAAK,OACxE,EAAI,EAAE,YAAY,EAAI,EAAE,YAAY,KAAK,EAAE,YACpC,IACN,EAAE,CAAC,EACA,IAAkB,KAAK,IAAI,GAAG,OAAO,OAAO,EAAiB,CAAC;AAEpE,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eAAyB;KAAkB,CAAA,EACzD,kBAAC,KAAD;KAAG,WAAU;eAA8B;KAA4C,CAAA,CACnF,EAAA,CAAA,EACN,kBAAC,GAAD;KAAQ,MAAK;eAAb,CACE,kBAAC,GAAD,EAAO,WAAU,gBAAiB,CAAA,EAAA,WAE3B;OACL;;GAEN,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;MAAY,WAAU;gBAAtB,CACE,kBAAC,GAAD;OAAW,WAAU;iBAAsB;OAAuB,CAAA,EAClE,kBAAC,GAAD,EAAO,WAAU,+BAAgC,CAAA,CACtC;SACb,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,OAAD;MAAK,WAAU;gBAAsB,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AU,0BAA2B,CAAA,EAC3C,EAAM,QACH;aACN,kBAAC,OAAD;UAAK,WAAU;oBAAf,CACE,kBAAC,GAAD,EAAQ,WAAU,wBAAyB,CAAA,EAC1C,EAAM,SACH;YACF;;QACN,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,KAAD;UAAG,WAAU;oBAAb,CAAoC,EAAM,YAAW,IAAK;aACzD,EAAM,WAAW,KAChB,kBAAC,KAAD;UAAG,WAAU;oBAAb;WAAuC;WAAE,EAAM;WAAS;WAAQ;YAE9D;;QACN,kBAAC,GAAD;SACE,SAAS,EAAM,WAAW,aAAa,YAAY;SACnD,WAAU;mBAET,EAAM;SACD,CAAA;QACJ;SACF;QA7BI,EAAM,GA6BV,CACN;KACU,CAAA,CACT,EAAA,CAAA,CACH;;GACF"}
|
|
@@ -30,7 +30,7 @@ function g() {
|
|
|
30
30
|
className: "text-2xl font-semibold",
|
|
31
31
|
children: "Assessments"
|
|
32
32
|
}), /* @__PURE__ */ o("p", {
|
|
33
|
-
className: "text-sm text-
|
|
33
|
+
className: "text-sm text-text-secondary",
|
|
34
34
|
children: "Quizzes and exams for your enrolled courses"
|
|
35
35
|
})] }),
|
|
36
36
|
/* @__PURE__ */ s("div", {
|
|
@@ -78,7 +78,7 @@ function g() {
|
|
|
78
78
|
children: e.title
|
|
79
79
|
}),
|
|
80
80
|
/* @__PURE__ */ s("p", {
|
|
81
|
-
className: "text-xs text-
|
|
81
|
+
className: "text-xs text-text-secondary",
|
|
82
82
|
children: [
|
|
83
83
|
e.course,
|
|
84
84
|
" · ",
|
|
@@ -88,7 +88,7 @@ function g() {
|
|
|
88
88
|
]
|
|
89
89
|
}),
|
|
90
90
|
/* @__PURE__ */ s("p", {
|
|
91
|
-
className: "text-xs text-
|
|
91
|
+
className: "text-xs text-text-secondary",
|
|
92
92
|
children: [
|
|
93
93
|
"Due: ",
|
|
94
94
|
e.dueDate,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LearningAssessmentsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningAssessmentsPagePage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { Badge, Button, Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { CheckCircle, Clock, FileText, Play } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\ntype Assessment = {\n id: string;\n title: string;\n course: string;\n questions: number;\n duration: string;\n status: 'available' | 'completed' | 'overdue';\n score?: number;\n dueDate: string;\n passingScore: number;\n};\n\nconst BASE_TS = new Date('2026-03-01T00:00:00Z').getTime();\n\nconst formatDate = (value: string): string => {\n const parsed = new Date(value);\n if (Number.isNaN(parsed.getTime())) {\n return 'Unknown';\n }\n return parsed.toISOString().split('T')[0];\n};\n\nexport function LearningAssessmentsPagePage() {\n const { courses } = useCrewFoundryStore();\n\n const assessments = useMemo<Assessment[]>(() => {\n return courses.slice(0, 16).map((course, index) => {\n const status: Assessment['status'] =\n index % 6 === 0 ? 'overdue' : index % 2 === 0 ? 'available' : 'completed';\n const passingScore = 70 + (index % 4) * 5;\n\n return {\n id: course.id,\n title: `${course.title} Assessment`,\n course: course.title,\n questions: Math.max(10, course.modules * 4),\n duration: `${Math.max(15, course.modules * 8)} min`,\n status,\n score:\n status === 'completed' ? Math.min(99, Math.round(course.rating * 20 + 20)) : undefined,\n dueDate: formatDate(new Date(BASE_TS + (index - 3) * 86400000 * 6).toISOString()),\n passingScore,\n };\n });\n }, [courses]);\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Assessments</h1>\n <p className=\"text-sm text-
|
|
1
|
+
{"version":3,"file":"LearningAssessmentsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningAssessmentsPagePage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { Badge, Button, Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { CheckCircle, Clock, FileText, Play } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\ntype Assessment = {\n id: string;\n title: string;\n course: string;\n questions: number;\n duration: string;\n status: 'available' | 'completed' | 'overdue';\n score?: number;\n dueDate: string;\n passingScore: number;\n};\n\nconst BASE_TS = new Date('2026-03-01T00:00:00Z').getTime();\n\nconst formatDate = (value: string): string => {\n const parsed = new Date(value);\n if (Number.isNaN(parsed.getTime())) {\n return 'Unknown';\n }\n return parsed.toISOString().split('T')[0];\n};\n\nexport function LearningAssessmentsPagePage() {\n const { courses } = useCrewFoundryStore();\n\n const assessments = useMemo<Assessment[]>(() => {\n return courses.slice(0, 16).map((course, index) => {\n const status: Assessment['status'] =\n index % 6 === 0 ? 'overdue' : index % 2 === 0 ? 'available' : 'completed';\n const passingScore = 70 + (index % 4) * 5;\n\n return {\n id: course.id,\n title: `${course.title} Assessment`,\n course: course.title,\n questions: Math.max(10, course.modules * 4),\n duration: `${Math.max(15, course.modules * 8)} min`,\n status,\n score:\n status === 'completed' ? Math.min(99, Math.round(course.rating * 20 + 20)) : undefined,\n dueDate: formatDate(new Date(BASE_TS + (index - 3) * 86400000 * 6).toISOString()),\n passingScore,\n };\n });\n }, [courses]);\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Assessments</h1>\n <p className=\"text-sm text-text-secondary\">Quizzes and exams for your enrolled courses</p>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-3\">\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Available</CardTitle>\n <FileText className=\"h-4 w-4 text-blue-500\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">\n {assessments.filter((assessment) => assessment.status === 'available').length}\n </div>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Completed</CardTitle>\n <CheckCircle className=\"h-4 w-4 text-green-500\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">\n {assessments.filter((assessment) => assessment.status === 'completed').length}\n </div>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Overdue</CardTitle>\n <Clock className=\"h-4 w-4 text-red-500\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">\n {assessments.filter((assessment) => assessment.status === 'overdue').length}\n </div>\n </CardContent>\n </Card>\n </div>\n\n <Card>\n <CardHeader>\n <CardTitle>All Assessments</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {assessments.map((assessment) => (\n <div\n key={assessment.id}\n className=\"flex items-center justify-between rounded border p-4\"\n >\n <div>\n <p className=\"text-sm font-medium\">{assessment.title}</p>\n <p className=\"text-xs text-text-secondary\">\n {assessment.course} · {assessment.questions} questions · {assessment.duration}\n </p>\n <p className=\"text-xs text-text-secondary\">\n Due: {assessment.dueDate} · Passing: {assessment.passingScore}%\n </p>\n </div>\n <div className=\"flex items-center gap-2\">\n {assessment.status === 'completed' && assessment.score ? (\n <Badge\n variant={\n assessment.score >= assessment.passingScore ? 'default' : 'destructive'\n }\n className=\"text-[10px]\"\n >\n Score: {assessment.score}%\n </Badge>\n ) : null}\n <Badge\n variant={\n assessment.status === 'completed'\n ? 'default'\n : assessment.status === 'overdue'\n ? 'destructive'\n : 'secondary'\n }\n className=\"text-[10px]\"\n >\n {assessment.status}\n </Badge>\n {assessment.status === 'available' ? (\n <Button size=\"sm\">\n <Play className=\"mr-1 h-3 w-3\" />\n Start\n </Button>\n ) : null}\n {assessment.status === 'overdue' ? (\n <Button size=\"sm\" variant=\"destructive\">\n <Play className=\"mr-1 h-3 w-3\" />\n Take Now\n </Button>\n ) : null}\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;AAiBA,IAAM,qBAAU,IAAI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D;;MACA,EAAA,CAAA,EACN,kBAAC,OAAD;MAAK,WAAU;gBAAf;OACG,EAAW,WAAW,eAAe,EAAW,QAC/C,kBAAC,GAAD;QACE,SACE,EAAW,SAAS,EAAW,eAAe,YAAY;QAE5D,WAAU;kBAJZ;SAKC;SACS,EAAW;SAAM;SACnB;YACN;OACJ,kBAAC,GAAD;QACE,SACE,EAAW,WAAW,cAClB,YACA,EAAW,WAAW,YACpB,gBACA;QAER,WAAU;kBAET,EAAW;QACN,CAAA;OACP,EAAW,WAAW,cACrB,kBAAC,GAAD;QAAQ,MAAK;kBAAb,CACE,kBAAC,GAAD,EAAM,WAAU,gBAAiB,CAAA,EAAA,QAE1B;YACP;OACH,EAAW,WAAW,YACrB,kBAAC,GAAD;QAAQ,MAAK;QAAK,SAAQ;kBAA1B,CACE,kBAAC,GAAD,EAAM,WAAU,gBAAiB,CAAA,EAAA,WAE1B;YACP;OACA;QACF;OAhDC,EAAW,GAgDZ,CACN;IACU,CAAA,CACT,EAAA,CAAA;GACH"}
|
|
@@ -27,7 +27,7 @@ function h() {
|
|
|
27
27
|
className: "text-2xl font-semibold",
|
|
28
28
|
children: "Certificates"
|
|
29
29
|
}), /* @__PURE__ */ o("p", {
|
|
30
|
-
className: "text-sm text-
|
|
30
|
+
className: "text-sm text-text-secondary",
|
|
31
31
|
children: [_.length, " certificates earned"]
|
|
32
32
|
})] }), /* @__PURE__ */ a("div", {
|
|
33
33
|
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
@@ -42,7 +42,7 @@ function h() {
|
|
|
42
42
|
className: "mt-2 text-base",
|
|
43
43
|
children: e.title
|
|
44
44
|
})] }), /* @__PURE__ */ o(u, { children: [/* @__PURE__ */ o("div", {
|
|
45
|
-
className: "space-y-2 text-sm text-
|
|
45
|
+
className: "space-y-2 text-sm text-text-secondary",
|
|
46
46
|
children: [
|
|
47
47
|
/* @__PURE__ */ o("div", { children: [
|
|
48
48
|
/* @__PURE__ */ a("span", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LearningCertificatesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningCertificatesPagePage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { Badge, Button, Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { Award, Download, ExternalLink } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\ntype Certificate = {\n id: string;\n title: string;\n issueDate: string;\n instructor: string;\n credentialId: string;\n status: 'active' | 'expiring';\n expiryDate?: string;\n};\n\nconst BASE_TS = new Date('2026-03-01T00:00:00Z').getTime();\n\nconst isoDate = (value: string): string => {\n const parsed = new Date(value);\n if (Number.isNaN(parsed.getTime())) {\n return 'Unknown';\n }\n return parsed.toISOString().split('T')[0];\n};\n\nexport function LearningCertificatesPagePage() {\n const { courses, employees } = useCrewFoundryStore();\n\n const certificates = useMemo<Certificate[]>(() => {\n return courses.slice(0, 12).map((course, index) => {\n const instructor =\n employees[index % Math.max(employees.length, 1)]?.firstName &&\n employees[index % Math.max(employees.length, 1)]?.lastName\n ? `${employees[index % employees.length].firstName} ${employees[index % employees.length].lastName}`\n : course.instructor;\n\n return {\n id: course.id,\n title: course.title,\n issueDate: isoDate(new Date(BASE_TS - index * 86400000 * 12).toISOString()),\n instructor,\n credentialId: `CF-${course.id.slice(0, 6).toUpperCase()}-${index + 1}`,\n status: index % 5 === 0 ? 'expiring' : 'active',\n expiryDate:\n index % 5 === 0\n ? isoDate(new Date(BASE_TS + 86400000 * (60 + index * 3)).toISOString())\n : undefined,\n };\n });\n }, [courses, employees]);\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Certificates</h1>\n <p className=\"text-sm text-
|
|
1
|
+
{"version":3,"file":"LearningCertificatesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningCertificatesPagePage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { Badge, Button, Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { Award, Download, ExternalLink } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\ntype Certificate = {\n id: string;\n title: string;\n issueDate: string;\n instructor: string;\n credentialId: string;\n status: 'active' | 'expiring';\n expiryDate?: string;\n};\n\nconst BASE_TS = new Date('2026-03-01T00:00:00Z').getTime();\n\nconst isoDate = (value: string): string => {\n const parsed = new Date(value);\n if (Number.isNaN(parsed.getTime())) {\n return 'Unknown';\n }\n return parsed.toISOString().split('T')[0];\n};\n\nexport function LearningCertificatesPagePage() {\n const { courses, employees } = useCrewFoundryStore();\n\n const certificates = useMemo<Certificate[]>(() => {\n return courses.slice(0, 12).map((course, index) => {\n const instructor =\n employees[index % Math.max(employees.length, 1)]?.firstName &&\n employees[index % Math.max(employees.length, 1)]?.lastName\n ? `${employees[index % employees.length].firstName} ${employees[index % employees.length].lastName}`\n : course.instructor;\n\n return {\n id: course.id,\n title: course.title,\n issueDate: isoDate(new Date(BASE_TS - index * 86400000 * 12).toISOString()),\n instructor,\n credentialId: `CF-${course.id.slice(0, 6).toUpperCase()}-${index + 1}`,\n status: index % 5 === 0 ? 'expiring' : 'active',\n expiryDate:\n index % 5 === 0\n ? isoDate(new Date(BASE_TS + 86400000 * (60 + index * 3)).toISOString())\n : undefined,\n };\n });\n }, [courses, employees]);\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Certificates</h1>\n <p className=\"text-sm text-text-secondary\">{certificates.length} certificates earned</p>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-3\">\n {certificates.map((certificate) => (\n <Card key={certificate.id}>\n <CardHeader>\n <div className=\"flex items-center justify-between\">\n <Award className=\"h-8 w-8 text-yellow-500\" />\n <Badge\n variant={certificate.status === 'active' ? 'default' : 'secondary'}\n className=\"text-[10px]\"\n >\n {certificate.status}\n </Badge>\n </div>\n <CardTitle className=\"mt-2 text-base\">{certificate.title}</CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"space-y-2 text-sm text-text-secondary\">\n <div>\n <span className=\"text-xs\">Instructor:</span> {certificate.instructor}\n </div>\n <div>\n <span className=\"text-xs\">Issued:</span> {certificate.issueDate}\n </div>\n <div>\n <span className=\"text-xs\">Credential ID:</span> {certificate.credentialId}\n </div>\n {certificate.expiryDate ? (\n <div className=\"text-yellow-600\">\n <span className=\"text-xs\">Expires:</span> {certificate.expiryDate}\n </div>\n ) : null}\n </div>\n\n <div className=\"mt-3 flex gap-2\">\n <Button variant=\"outline\" size=\"sm\" className=\"flex-1\">\n <Download className=\"mr-1 h-3 w-3\" />\n Download\n </Button>\n <Button variant=\"outline\" size=\"sm\" className=\"flex-1\">\n <ExternalLink className=\"mr-1 h-3 w-3\" />\n Verify\n </Button>\n </div>\n </CardContent>\n </Card>\n ))}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;AAeA,IAAM,qBAAU,IAAI,KAAK,uBAAuB,EAAC,SAAS,EAEpD,KAAW,MAA0B;CACzC,IAAM,IAAS,IAAI,KAAK,EAAM;AAI9B,QAHI,OAAO,MAAM,EAAO,SAAS,CAAC,GACzB,YAEF,EAAO,aAAa,CAAC,MAAM,IAAI,CAAC;;AAGzC,SAAgB,IAA+B;CAC7C,IAAM,EAAE,YAAS,iBAAc,GAAqB,EAE9C,IAAe,QACZ,EAAQ,MAAM,GAAG,GAAG,CAAC,KAAK,GAAQ,MAAU;EACjD,IAAM,IACJ,EAAU,IAAQ,KAAK,IAAI,EAAU,QAAQ,EAAE,GAAG,aAClD,EAAU,IAAQ,KAAK,IAAI,EAAU,QAAQ,EAAE,GAAG,WAC9C,GAAG,EAAU,IAAQ,EAAU,QAAQ,UAAU,GAAG,EAAU,IAAQ,EAAU,QAAQ,aACxF,EAAO;AAEb,SAAO;GACL,IAAI,EAAO;GACX,OAAO,EAAO;GACd,WAAW,mBAAQ,IAAI,KAAK,IAAU,IAAQ,QAAW,GA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MAAE,EAAY;MACzD,EAAA,CAAA;KACL,EAAY,aACX,kBAAC,OAAD;MAAK,WAAU;gBAAf;OACE,kBAAC,QAAD;QAAM,WAAU;kBAAU;QAAe,CAAA;;OAAE,EAAY;OACnD;UACJ;KACA;OAEN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD;KAAQ,SAAQ;KAAU,MAAK;KAAK,WAAU;eAA9C,CACE,kBAAC,GAAD,EAAU,WAAU,gBAAiB,CAAA,EAAA,WAE9B;QACT,kBAAC,GAAD;KAAQ,SAAQ;KAAU,MAAK;KAAK,WAAU;eAA9C,CACE,kBAAC,GAAD,EAAc,WAAU,gBAAiB,CAAA,EAAA,SAElC;OACL;MACM,EAAA,CAAA,CACT,EAAA,EA1CI,EAAY,GA0ChB,CACP;GACE,CAAA,CACF"}
|
|
@@ -6,7 +6,7 @@ import { Badge as c, Button as l, Card as u, CardContent as d, CardHeader as f,
|
|
|
6
6
|
function m() {
|
|
7
7
|
let { courses: m } = e(), h = m[0];
|
|
8
8
|
if (!h) return /* @__PURE__ */ o("div", {
|
|
9
|
-
className: "p-6 text-
|
|
9
|
+
className: "p-6 text-text-secondary",
|
|
10
10
|
children: "No course found."
|
|
11
11
|
});
|
|
12
12
|
let g = Math.round(h.completed / h.enrolled * 100);
|
|
@@ -25,7 +25,7 @@ function m() {
|
|
|
25
25
|
children: h.level
|
|
26
26
|
})]
|
|
27
27
|
}), /* @__PURE__ */ s("p", {
|
|
28
|
-
className: "text-sm text-
|
|
28
|
+
className: "text-sm text-text-secondary",
|
|
29
29
|
children: [
|
|
30
30
|
"by ",
|
|
31
31
|
h.instructor,
|
|
@@ -40,13 +40,13 @@ function m() {
|
|
|
40
40
|
/* @__PURE__ */ o(u, { children: /* @__PURE__ */ s(d, {
|
|
41
41
|
className: "p-4 text-center",
|
|
42
42
|
children: [
|
|
43
|
-
/* @__PURE__ */ o(n, { className: "h-5 w-5 mx-auto text-
|
|
43
|
+
/* @__PURE__ */ o(n, { className: "h-5 w-5 mx-auto text-text-secondary mb-1" }),
|
|
44
44
|
/* @__PURE__ */ o("p", {
|
|
45
45
|
className: "text-lg font-bold",
|
|
46
46
|
children: h.duration
|
|
47
47
|
}),
|
|
48
48
|
/* @__PURE__ */ o("p", {
|
|
49
|
-
className: "text-xs text-
|
|
49
|
+
className: "text-xs text-text-secondary",
|
|
50
50
|
children: "Duration"
|
|
51
51
|
})
|
|
52
52
|
]
|
|
@@ -54,13 +54,13 @@ function m() {
|
|
|
54
54
|
/* @__PURE__ */ o(u, { children: /* @__PURE__ */ s(d, {
|
|
55
55
|
className: "p-4 text-center",
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */ o(t, { className: "h-5 w-5 mx-auto text-
|
|
57
|
+
/* @__PURE__ */ o(t, { className: "h-5 w-5 mx-auto text-text-secondary mb-1" }),
|
|
58
58
|
/* @__PURE__ */ o("p", {
|
|
59
59
|
className: "text-lg font-bold",
|
|
60
60
|
children: h.modules
|
|
61
61
|
}),
|
|
62
62
|
/* @__PURE__ */ o("p", {
|
|
63
|
-
className: "text-xs text-
|
|
63
|
+
className: "text-xs text-text-secondary",
|
|
64
64
|
children: "Modules"
|
|
65
65
|
})
|
|
66
66
|
]
|
|
@@ -68,13 +68,13 @@ function m() {
|
|
|
68
68
|
/* @__PURE__ */ o(u, { children: /* @__PURE__ */ s(d, {
|
|
69
69
|
className: "p-4 text-center",
|
|
70
70
|
children: [
|
|
71
|
-
/* @__PURE__ */ o(a, { className: "h-5 w-5 mx-auto text-
|
|
71
|
+
/* @__PURE__ */ o(a, { className: "h-5 w-5 mx-auto text-text-secondary mb-1" }),
|
|
72
72
|
/* @__PURE__ */ o("p", {
|
|
73
73
|
className: "text-lg font-bold",
|
|
74
74
|
children: h.enrolled
|
|
75
75
|
}),
|
|
76
76
|
/* @__PURE__ */ o("p", {
|
|
77
|
-
className: "text-xs text-
|
|
77
|
+
className: "text-xs text-text-secondary",
|
|
78
78
|
children: "Enrolled"
|
|
79
79
|
})
|
|
80
80
|
]
|
|
@@ -88,7 +88,7 @@ function m() {
|
|
|
88
88
|
children: [h.rating, "/5"]
|
|
89
89
|
}),
|
|
90
90
|
/* @__PURE__ */ o("p", {
|
|
91
|
-
className: "text-xs text-
|
|
91
|
+
className: "text-xs text-text-secondary",
|
|
92
92
|
children: "Rating"
|
|
93
93
|
})
|
|
94
94
|
]
|
|
@@ -96,7 +96,7 @@ function m() {
|
|
|
96
96
|
]
|
|
97
97
|
}),
|
|
98
98
|
/* @__PURE__ */ s(u, { children: [/* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(p, { children: "About this Course" }) }), /* @__PURE__ */ s(d, { children: [/* @__PURE__ */ o("p", {
|
|
99
|
-
className: "text-sm text-
|
|
99
|
+
className: "text-sm text-text-secondary",
|
|
100
100
|
children: h.description
|
|
101
101
|
}), /* @__PURE__ */ o("div", {
|
|
102
102
|
className: "flex flex-wrap gap-1 mt-3",
|
|
@@ -119,7 +119,7 @@ function m() {
|
|
|
119
119
|
children: [g, "%"]
|
|
120
120
|
})]
|
|
121
121
|
}), /* @__PURE__ */ o("div", {
|
|
122
|
-
className: "h-3 bg-
|
|
122
|
+
className: "h-3 bg-bg-sunken rounded overflow-hidden",
|
|
123
123
|
children: /* @__PURE__ */ o("div", {
|
|
124
124
|
className: "h-3 bg-green-500 rounded",
|
|
125
125
|
style: { width: `${g}%` }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LearningCourseDetailsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningCourseDetailsPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Button,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from '@burdenoff/fe-libs/ui';\nimport { BookOpen, CheckCircle, Clock, Play, Star, Users } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function LearningCourseDetailsPagePage() {\n const { courses } = useCrewFoundryStore();\n const course = courses[0];\n if (!course) return <div className=\"p-6 text-
|
|
1
|
+
{"version":3,"file":"LearningCourseDetailsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningCourseDetailsPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Button,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from '@burdenoff/fe-libs/ui';\nimport { BookOpen, CheckCircle, Clock, Play, Star, Users } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function LearningCourseDetailsPagePage() {\n const { courses } = useCrewFoundryStore();\n const course = courses[0];\n if (!course) return <div className=\"p-6 text-text-secondary\">No course found.</div>;\n const completionRate = Math.round((course.completed / course.enrolled) * 100);\n\n return (\n <div className=\"space-y-6 p-6 max-w-4xl\">\n <div className=\"flex items-center justify-between\">\n <div>\n <div className=\"flex items-center gap-2 mb-1\">\n <h1 className=\"text-2xl font-semibold\">{course.title}</h1>\n <Badge\n variant={\n course.level === 'beginner'\n ? 'secondary'\n : course.level === 'intermediate'\n ? 'default'\n : 'destructive'\n }\n >\n {course.level}\n </Badge>\n </div>\n <p className=\"text-sm text-text-secondary\">\n by {course.instructor} · {course.category}\n </p>\n </div>\n <Button>\n <Play className=\"h-4 w-4 mr-1\" />\n Start Course\n </Button>\n </div>\n <div className=\"grid gap-4 md:grid-cols-4\">\n <Card>\n <CardContent className=\"p-4 text-center\">\n <Clock className=\"h-5 w-5 mx-auto text-text-secondary mb-1\" />\n <p className=\"text-lg font-bold\">{course.duration}</p>\n <p className=\"text-xs text-text-secondary\">Duration</p>\n </CardContent>\n </Card>\n <Card>\n <CardContent className=\"p-4 text-center\">\n <BookOpen className=\"h-5 w-5 mx-auto text-text-secondary mb-1\" />\n <p className=\"text-lg font-bold\">{course.modules}</p>\n <p className=\"text-xs text-text-secondary\">Modules</p>\n </CardContent>\n </Card>\n <Card>\n <CardContent className=\"p-4 text-center\">\n <Users className=\"h-5 w-5 mx-auto text-text-secondary mb-1\" />\n <p className=\"text-lg font-bold\">{course.enrolled}</p>\n <p className=\"text-xs text-text-secondary\">Enrolled</p>\n </CardContent>\n </Card>\n <Card>\n <CardContent className=\"p-4 text-center\">\n <Star className=\"h-5 w-5 mx-auto text-yellow-500 mb-1\" />\n <p className=\"text-lg font-bold\">{course.rating}/5</p>\n <p className=\"text-xs text-text-secondary\">Rating</p>\n </CardContent>\n </Card>\n </div>\n <Card>\n <CardHeader>\n <CardTitle>About this Course</CardTitle>\n </CardHeader>\n <CardContent>\n <p className=\"text-sm text-text-secondary\">{course.description}</p>\n <div className=\"flex flex-wrap gap-1 mt-3\">\n {course.skills.map((s) => (\n <Badge key={s} variant=\"outline\">\n {s}\n </Badge>\n ))}\n </div>\n </CardContent>\n </Card>\n <Card>\n <CardHeader>\n <CardTitle>Completion Statistics</CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"space-y-2\">\n <div className=\"flex justify-between text-sm\">\n <span>\n {course.completed} of {course.enrolled} students completed\n </span>\n <span className=\"font-medium\">{completionRate}%</span>\n </div>\n <div className=\"h-3 bg-bg-sunken rounded overflow-hidden\">\n <div className=\"h-3 bg-green-500 rounded\" style={{ width: `${completionRate}%` }} />\n </div>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;AAYA,SAAgB,IAAgC;CAC9C,IAAM,EAAE,eAAY,GAAqB,EACnC,IAAS,EAAQ;AACvB,KAAI,CAAC,EAAQ,QAAO,kBAAC,OAAD;EAAK,WAAU;YAA0B;EAAsB,CAAA;CACnF,IAAM,IAAiB,KAAK,MAAO,EAAO,YAAY,EAAO,WAAY,IAAI;AAE7E,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,MAAD;MAAI,WAAU;gBAA0B,EAAO;MAAW,CAAA,EAC1D,kBAAC,GAAD;MACE,SACE,EAAO,UAAU,aACb,cACA,E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CAAA;KACH;;GACN,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UAAW,qBAA6B,CAAA,EAC7B,CAAA,EACb,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,KAAD;IAAG,WAAU;cAA+B,EAAO;IAAgB,CAAA,EACnE,kBAAC,OAAD;IAAK,WAAU;cACZ,EAAO,OAAO,KAAK,MAClB,kBAAC,GAAD;KAAe,SAAQ;eACpB;KACK,EAFI,EAEJ,CACR;IACE,CAAA,CACM,EAAA,CAAA,CACT,EAAA,CAAA;GACP,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UAAW,yBAAiC,CAAA,EACjC,CAAA,EACb,kBAAC,GAAD,EAAA,UACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,QAAD,EAAA,UAAA;MACG,EAAO;MAAU;MAAK,EAAO;MAAS;MAClC,EAAA,CAAA,EACP,kBAAC,QAAD;MAAM,WAAU;gBAAhB,CAA+B,GAAe,IAAQ;QAClD;QACN,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,OAAD;MAAK,WAAU;MAA2B,OAAO,EAAE,OAAO,GAAG,EAAe,IAAI;MAAI,CAAA;KAChF,CAAA,CACF;OACM,CAAA,CACT,EAAA,CAAA;GACH"}
|
|
@@ -24,7 +24,7 @@ function p() {
|
|
|
24
24
|
className: "text-2xl font-semibold",
|
|
25
25
|
children: m?.title || "Leadership Fundamentals for Tech Managers"
|
|
26
26
|
}), /* @__PURE__ */ o("p", {
|
|
27
|
-
className: "text-sm text-
|
|
27
|
+
className: "text-sm text-text-secondary",
|
|
28
28
|
children: [
|
|
29
29
|
"by ",
|
|
30
30
|
m?.instructor || "CrewFoundry Academy",
|
|
@@ -49,14 +49,14 @@ function p() {
|
|
|
49
49
|
})]
|
|
50
50
|
}),
|
|
51
51
|
/* @__PURE__ */ a("div", {
|
|
52
|
-
className: "h-3 overflow-hidden rounded bg-
|
|
52
|
+
className: "h-3 overflow-hidden rounded bg-bg-sunken",
|
|
53
53
|
children: /* @__PURE__ */ a("div", {
|
|
54
|
-
className: "h-3 rounded bg-primary",
|
|
54
|
+
className: "h-3 rounded bg-action-primary-bg",
|
|
55
55
|
style: { width: `${_}%` }
|
|
56
56
|
})
|
|
57
57
|
}),
|
|
58
58
|
/* @__PURE__ */ o("p", {
|
|
59
|
-
className: "mt-1 text-xs text-
|
|
59
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
60
60
|
children: [
|
|
61
61
|
g,
|
|
62
62
|
" of ",
|
|
@@ -72,16 +72,16 @@ function p() {
|
|
|
72
72
|
className: `flex items-center gap-3 rounded border p-3 ${e.status === "locked" ? "opacity-50" : ""}`,
|
|
73
73
|
children: [
|
|
74
74
|
/* @__PURE__ */ a("div", {
|
|
75
|
-
className: "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-
|
|
75
|
+
className: "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-bg-sunken text-xs font-bold",
|
|
76
76
|
children: e.status === "completed" ? /* @__PURE__ */ a(n, { className: "h-5 w-5 text-green-500" }) : t + 1
|
|
77
77
|
}),
|
|
78
78
|
/* @__PURE__ */ o("div", {
|
|
79
79
|
className: "flex-1",
|
|
80
80
|
children: [/* @__PURE__ */ a("p", {
|
|
81
|
-
className: `text-sm ${e.status === "completed" ? "text-
|
|
81
|
+
className: `text-sm ${e.status === "completed" ? "text-text-secondary line-through" : "font-medium"}`,
|
|
82
82
|
children: e.title
|
|
83
83
|
}), /* @__PURE__ */ o("p", {
|
|
84
|
-
className: "flex items-center gap-1 text-xs text-
|
|
84
|
+
className: "flex items-center gap-1 text-xs text-text-secondary",
|
|
85
85
|
children: [/* @__PURE__ */ a(r, { className: "h-3 w-3" }), e.duration]
|
|
86
86
|
})]
|
|
87
87
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LearningCourseLearningPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningCourseLearningPagePage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { Badge, Button, Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { CheckCircle, Clock, Play } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\ntype CourseModule = {\n id: string;\n title: string;\n duration: string;\n status: 'completed' | 'in_progress' | 'locked';\n};\n\nexport function LearningCourseLearningPagePage() {\n const { courses } = useCrewFoundryStore();\n\n const currentCourse = courses[0];\n\n const courseModules = useMemo<CourseModule[]>(() => {\n const moduleCount = Math.max(currentCourse?.modules || 0, 6);\n return Array.from({ length: moduleCount }, (_, index) => {\n const status: CourseModule['status'] =\n index < 2 ? 'completed' : index === 2 ? 'in_progress' : 'locked';\n return {\n id: `module-${index + 1}`,\n title: `${currentCourse?.title || 'Learning'} Module ${index + 1}`,\n duration: `${25 + (index % 4) * 10} min`,\n status,\n };\n });\n }, [currentCourse]);\n\n const completedCount = courseModules.filter((module) => module.status === 'completed').length;\n const progress = Math.round((completedCount / Math.max(courseModules.length, 1)) * 100);\n\n return (\n <div className=\"max-w-3xl space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n {currentCourse?.title || 'Leadership Fundamentals for Tech Managers'}\n </h1>\n <p className=\"text-sm text-
|
|
1
|
+
{"version":3,"file":"LearningCourseLearningPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningCourseLearningPagePage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { Badge, Button, Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { CheckCircle, Clock, Play } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\ntype CourseModule = {\n id: string;\n title: string;\n duration: string;\n status: 'completed' | 'in_progress' | 'locked';\n};\n\nexport function LearningCourseLearningPagePage() {\n const { courses } = useCrewFoundryStore();\n\n const currentCourse = courses[0];\n\n const courseModules = useMemo<CourseModule[]>(() => {\n const moduleCount = Math.max(currentCourse?.modules || 0, 6);\n return Array.from({ length: moduleCount }, (_, index) => {\n const status: CourseModule['status'] =\n index < 2 ? 'completed' : index === 2 ? 'in_progress' : 'locked';\n return {\n id: `module-${index + 1}`,\n title: `${currentCourse?.title || 'Learning'} Module ${index + 1}`,\n duration: `${25 + (index % 4) * 10} min`,\n status,\n };\n });\n }, [currentCourse]);\n\n const completedCount = courseModules.filter((module) => module.status === 'completed').length;\n const progress = Math.round((completedCount / Math.max(courseModules.length, 1)) * 100);\n\n return (\n <div className=\"max-w-3xl space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n {currentCourse?.title || 'Leadership Fundamentals for Tech Managers'}\n </h1>\n <p className=\"text-sm text-text-secondary\">\n by {currentCourse?.instructor || 'CrewFoundry Academy'} · Module {completedCount + 1} of{' '}\n {courseModules.length}\n </p>\n </div>\n\n <Card>\n <CardContent className=\"p-4\">\n <div className=\"mb-2 flex items-center justify-between\">\n <span className=\"text-sm font-medium\">Progress</span>\n <span className=\"text-sm\">{progress}%</span>\n </div>\n <div className=\"h-3 overflow-hidden rounded bg-bg-sunken\">\n <div className=\"h-3 rounded bg-action-primary-bg\" style={{ width: `${progress}%` }} />\n </div>\n <p className=\"mt-1 text-xs text-text-secondary\">\n {completedCount} of {courseModules.length} modules completed\n </p>\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>Course Modules</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-2\">\n {courseModules.map((module, index) => (\n <div\n key={module.id}\n className={`flex items-center gap-3 rounded border p-3 ${module.status === 'locked' ? 'opacity-50' : ''}`}\n >\n <div className=\"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-bg-sunken text-xs font-bold\">\n {module.status === 'completed' ? (\n <CheckCircle className=\"h-5 w-5 text-green-500\" />\n ) : (\n index + 1\n )}\n </div>\n <div className=\"flex-1\">\n <p\n className={`text-sm ${module.status === 'completed' ? 'text-text-secondary line-through' : 'font-medium'}`}\n >\n {module.title}\n </p>\n <p className=\"flex items-center gap-1 text-xs text-text-secondary\">\n <Clock className=\"h-3 w-3\" />\n {module.duration}\n </p>\n </div>\n {module.status === 'in_progress' ? (\n <Button size=\"sm\">\n <Play className=\"mr-1 h-3 w-3\" />\n Continue\n </Button>\n ) : null}\n {module.status === 'completed' ? (\n <Badge variant=\"default\" className=\"text-[10px]\">\n Completed\n </Badge>\n ) : null}\n {module.status === 'locked' ? (\n <Badge variant=\"secondary\" className=\"text-[10px]\">\n Locked\n </Badge>\n ) : null}\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;AAYA,SAAgB,IAAiC;CAC/C,IAAM,EAAE,eAAY,GAAqB,EAEnC,IAAgB,EAAQ,IAExB,IAAgB,QAA8B;EAClD,IAAM,IAAc,KAAK,IAAI,GAAe,WAAW,GAAG,EAAE;AAC5D,SAAO,MAAM,KAAK,EAAE,QAAQ,GAAa,GAAG,GAAG,MAAU;GACvD,IAAM,IACJ,IAAQ,IAAI,cAAc,MAAU,IAAI,gBAAgB;AAC1D,UAAO;IACL,IAAI,UAAU,IAAQ;IACtB,OAAO,GAAG,GAAe,SAAS,WAAW,UAAU,IAAQ;IAC/D,UAAU,GAAG,KAAM,IAAQ,IAAK,GAAG;IACnC;IACD;IACD;IACD,CAAC,EAAc,CAAC,EAEb,IAAiB,EAAc,QAAQ,MAAW,EAAO,WAAW,YAAY,CAAC,QACjF,IAAW,KAAK,MAAO,IAAiB,KAAK,IAAI,EAAc,QAAQ,EAAE,GAAI,IAAI;AAEvF,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;cACX,GAAe,SAAS;IACtB,CAAA,EACL,kBAAC,KAAD;IAAG,WAAU;cAAb;KAA2C;KACr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,EAAO,WAAW,cACjB,kBAAC,GAAD;OAAO,SAAQ;OAAU,WAAU;iBAAc;OAEzC,CAAA,GACN;MACH,EAAO,WAAW,WACjB,kBAAC,GAAD;OAAO,SAAQ;OAAY,WAAU;iBAAc;OAE3C,CAAA,GACN;MACA;OArCC,EAAO,GAqCR,CACN;IACU,CAAA,CACT,EAAA,CAAA;GACH"}
|
|
@@ -13,12 +13,12 @@ function m() {
|
|
|
13
13
|
className: "text-2xl font-semibold",
|
|
14
14
|
children: "Course Catalog"
|
|
15
15
|
}), /* @__PURE__ */ o("p", {
|
|
16
|
-
className: "text-sm text-
|
|
16
|
+
className: "text-sm text-text-secondary",
|
|
17
17
|
children: [m.length, " courses available"]
|
|
18
18
|
})] }),
|
|
19
19
|
/* @__PURE__ */ o("div", {
|
|
20
20
|
className: "relative max-w-sm",
|
|
21
|
-
children: [/* @__PURE__ */ a(n, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-
|
|
21
|
+
children: [/* @__PURE__ */ a(n, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ a(p, {
|
|
22
22
|
placeholder: "Search courses...",
|
|
23
23
|
className: "pl-9",
|
|
24
24
|
value: h,
|
|
@@ -56,7 +56,7 @@ function m() {
|
|
|
56
56
|
] })
|
|
57
57
|
] }), /* @__PURE__ */ o(l, { children: [
|
|
58
58
|
/* @__PURE__ */ a("p", {
|
|
59
|
-
className: "text-sm text-
|
|
59
|
+
className: "text-sm text-text-secondary mb-3",
|
|
60
60
|
children: e.description
|
|
61
61
|
}),
|
|
62
62
|
/* @__PURE__ */ a("div", {
|
|
@@ -68,7 +68,7 @@ function m() {
|
|
|
68
68
|
}, e))
|
|
69
69
|
}),
|
|
70
70
|
/* @__PURE__ */ o("div", {
|
|
71
|
-
className: "flex items-center justify-between text-xs text-
|
|
71
|
+
className: "flex items-center justify-between text-xs text-text-secondary",
|
|
72
72
|
children: [
|
|
73
73
|
/* @__PURE__ */ o("span", {
|
|
74
74
|
className: "flex items-center gap-1",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LearningCoursesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningCoursesPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n Badge,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n Input,\n} from '@burdenoff/fe-libs/ui';\nimport { BookOpen, Search, Star, Users } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function LearningCoursesPagePage() {\n const { courses } = useCrewFoundryStore();\n const [search, setSearch] = useState('');\n const filtered = courses.filter((c) =>\n `${c.title} ${c.category} ${c.instructor}`.toLowerCase().includes(search.toLowerCase())\n );\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Course Catalog</h1>\n <p className=\"text-sm text-
|
|
1
|
+
{"version":3,"file":"LearningCoursesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningCoursesPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n Badge,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n Input,\n} from '@burdenoff/fe-libs/ui';\nimport { BookOpen, Search, Star, Users } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function LearningCoursesPagePage() {\n const { courses } = useCrewFoundryStore();\n const [search, setSearch] = useState('');\n const filtered = courses.filter((c) =>\n `${c.title} ${c.category} ${c.instructor}`.toLowerCase().includes(search.toLowerCase())\n );\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Course Catalog</h1>\n <p className=\"text-sm text-text-secondary\">{courses.length} courses available</p>\n </div>\n <div className=\"relative max-w-sm\">\n <Search className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary\" />\n <Input\n placeholder=\"Search courses...\"\n className=\"pl-9\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n </div>\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-3\">\n {filtered.map((course) => (\n <Card key={course.id} className=\"hover:shadow-md transition-shadow cursor-pointer\">\n <CardHeader>\n <div className=\"flex items-center justify-between\">\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {course.category}\n </Badge>\n <Badge\n variant={\n course.level === 'beginner'\n ? 'secondary'\n : course.level === 'intermediate'\n ? 'default'\n : 'destructive'\n }\n className=\"text-[10px]\"\n >\n {course.level}\n </Badge>\n </div>\n <CardTitle className=\"text-base mt-2\">{course.title}</CardTitle>\n <CardDescription>\n {course.instructor} · {course.duration} · {course.modules} modules\n </CardDescription>\n </CardHeader>\n <CardContent>\n <p className=\"text-sm text-text-secondary mb-3\">{course.description}</p>\n <div className=\"flex flex-wrap gap-1 mb-3\">\n {course.skills.map((s) => (\n <Badge key={s} variant=\"outline\" className=\"text-[9px]\">\n {s}\n </Badge>\n ))}\n </div>\n <div className=\"flex items-center justify-between text-xs text-text-secondary\">\n <span className=\"flex items-center gap-1\">\n <Star className=\"h-3 w-3 text-yellow-500\" />\n {course.rating}\n </span>\n <span className=\"flex items-center gap-1\">\n <Users className=\"h-3 w-3\" />\n {course.enrolled} enrolled\n </span>\n <span>{Math.round((course.completed / course.enrolled) * 100)}% completion</span>\n </div>\n </CardContent>\n </Card>\n ))}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;AAaA,SAAgB,IAA0B;CACxC,IAAM,EAAE,eAAY,GAAqB,EACnC,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,IAAW,EAAQ,QAAQ,MAC/B,GAAG,EAAE,MAAM,GAAG,EAAE,SAAS,GAAG,EAAE,aAAa,aAAa,CAAC,SAAS,EAAO,aAAa,CAAC,CACxF;AAED,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;cAAyB;IAAm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AAO,WAAU,WAAY,CAAA;UAC5B,EAAO;UAAS;UACZ;;QACP,kBAAC,QAAD,EAAA,UAAA,CAAO,KAAK,MAAO,EAAO,YAAY,EAAO,WAAY,IAAI,EAAC,eAAmB,EAAA,CAAA;QAC7E;;MACM,EAAA,CAAA,CACT;OA7CI,EAAO,GA6CX,CACP;IACE,CAAA;GACF"}
|
|
@@ -19,7 +19,7 @@ function h() {
|
|
|
19
19
|
className: "text-2xl font-semibold",
|
|
20
20
|
children: "Learning Analytics"
|
|
21
21
|
}), /* @__PURE__ */ o("p", {
|
|
22
|
-
className: "text-sm text-
|
|
22
|
+
className: "text-sm text-text-secondary",
|
|
23
23
|
children: "Training metrics and engagement insights"
|
|
24
24
|
})] }),
|
|
25
25
|
/* @__PURE__ */ s("div", {
|
|
@@ -30,7 +30,7 @@ function h() {
|
|
|
30
30
|
children: [/* @__PURE__ */ o(p, {
|
|
31
31
|
className: "text-sm font-medium",
|
|
32
32
|
children: "Total Enrollments"
|
|
33
|
-
}), /* @__PURE__ */ o(a, { className: "h-4 w-4 text-
|
|
33
|
+
}), /* @__PURE__ */ o(a, { className: "h-4 w-4 text-text-secondary" })]
|
|
34
34
|
}), /* @__PURE__ */ o(u, { children: /* @__PURE__ */ o("div", {
|
|
35
35
|
className: "text-2xl font-bold",
|
|
36
36
|
children: g
|
|
@@ -45,7 +45,7 @@ function h() {
|
|
|
45
45
|
className: "text-2xl font-bold",
|
|
46
46
|
children: _
|
|
47
47
|
}), /* @__PURE__ */ s("p", {
|
|
48
|
-
className: "text-xs text-
|
|
48
|
+
className: "text-xs text-text-secondary",
|
|
49
49
|
children: [Math.round(_ / Math.max(g, 1) * 100), "% rate"]
|
|
50
50
|
})] })] }),
|
|
51
51
|
/* @__PURE__ */ s(l, { children: [/* @__PURE__ */ s(f, {
|
|
@@ -63,12 +63,12 @@ function h() {
|
|
|
63
63
|
children: [/* @__PURE__ */ o(p, {
|
|
64
64
|
className: "text-sm font-medium",
|
|
65
65
|
children: "Training Hours"
|
|
66
|
-
}), /* @__PURE__ */ o(n, { className: "h-4 w-4 text-
|
|
66
|
+
}), /* @__PURE__ */ o(n, { className: "h-4 w-4 text-text-secondary" })]
|
|
67
67
|
}), /* @__PURE__ */ s(u, { children: [/* @__PURE__ */ o("div", {
|
|
68
68
|
className: "text-2xl font-bold",
|
|
69
69
|
children: x.toLocaleString()
|
|
70
70
|
}), /* @__PURE__ */ o("p", {
|
|
71
|
-
className: "text-xs text-
|
|
71
|
+
className: "text-xs text-text-secondary",
|
|
72
72
|
children: "Recent 6-month trend"
|
|
73
73
|
})] })] })
|
|
74
74
|
]
|
|
@@ -79,13 +79,13 @@ function h() {
|
|
|
79
79
|
className: "flex items-center gap-3",
|
|
80
80
|
children: [
|
|
81
81
|
/* @__PURE__ */ o("span", {
|
|
82
|
-
className: "w-10 text-sm text-
|
|
82
|
+
className: "w-10 text-sm text-text-secondary",
|
|
83
83
|
children: e.month
|
|
84
84
|
}),
|
|
85
85
|
/* @__PURE__ */ o("div", {
|
|
86
|
-
className: "h-4 flex-1 overflow-hidden rounded bg-
|
|
86
|
+
className: "h-4 flex-1 overflow-hidden rounded bg-bg-sunken",
|
|
87
87
|
children: /* @__PURE__ */ o("div", {
|
|
88
|
-
className: "h-4 rounded bg-primary",
|
|
88
|
+
className: "h-4 rounded bg-action-primary-bg",
|
|
89
89
|
style: { width: `${Math.round(e.hours / b * 100)}%` }
|
|
90
90
|
})
|
|
91
91
|
}),
|
|
@@ -123,7 +123,7 @@ function h() {
|
|
|
123
123
|
})]
|
|
124
124
|
}, e))
|
|
125
125
|
})] }), /* @__PURE__ */ s(l, { children: [/* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(p, { children: "Course Performance" }) }), /* @__PURE__ */ s(u, { children: [/* @__PURE__ */ s("div", {
|
|
126
|
-
className: "mb-2 grid grid-cols-4 gap-2 border-b pb-2 text-xs font-medium text-
|
|
126
|
+
className: "mb-2 grid grid-cols-4 gap-2 border-b pb-2 text-xs font-medium text-text-secondary",
|
|
127
127
|
children: [
|
|
128
128
|
/* @__PURE__ */ o("span", { children: "Course" }),
|
|
129
129
|
/* @__PURE__ */ o("span", {
|