@burdenoff/microfe-crewfoundry 2026.626.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.
- package/dist/crewfoundry/components/forms/ConfirmDialog.js +43 -0
- package/dist/crewfoundry/components/forms/ConfirmDialog.js.map +1 -0
- package/dist/crewfoundry/components/forms/FormModal.js +220 -0
- package/dist/crewfoundry/components/forms/FormModal.js.map +1 -0
- package/dist/crewfoundry/components/forms/formValues.js +20 -0
- package/dist/crewfoundry/components/forms/formValues.js.map +1 -0
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +255 -65
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js +28 -17
- package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsFilesPagePage.js +57 -53
- package/dist/crewfoundry/pages/CommunicationsFilesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js +32 -23
- package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js +44 -29
- package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +183 -57
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyCompanyDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +214 -92
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js +165 -131
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js +163 -133
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +269 -54
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCreateJobPagePage.js +225 -78
- package/dist/crewfoundry/pages/HiringCreateJobPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +213 -59
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +287 -90
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobsPagePage.js +49 -47
- package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +166 -59
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrEmployeesPagePage.js +274 -83
- package/dist/crewfoundry/pages/HrEmployeesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +198 -88
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrPayrollPagePage.js +216 -88
- package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +216 -66
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js +6 -7
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js +83 -68
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js +167 -46
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +75 -55
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js +152 -79
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningMyLearningPagePage.js +75 -63
- package/dist/crewfoundry/pages/LearningMyLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js +3 -1
- package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js +235 -87
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js +199 -86
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js +21 -40
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsCreateProjectPagePage.js +117 -45
- package/dist/crewfoundry/pages/ProjectsCreateProjectPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js +249 -90
- package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js +47 -45
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js +262 -133
- package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js +144 -77
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.js +339 -52
- package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LearningLearningPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningLearningPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport {
|
|
1
|
+
{"version":3,"file":"LearningLearningPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningLearningPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { BookOpen, GraduationCap, Star, TrendingUp, Users } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function LearningLearningPagePage() {\n const { courses, learningPaths } = useCrewFoundryStore();\n const totalEnrolled = courses.reduce((s, c) => s + c.enrolled, 0);\n const totalCompleted = courses.reduce((s, c) => s + c.completed, 0);\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Learning & Development</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n Explore courses, learning paths, and grow your skills\n </p>\n <PagePurpose className=\"mt-1\">Your learning home — discover courses, continue where you left off, and keep developing the skills your role needs.</PagePurpose>\n </div>\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Courses</CardTitle>\n <BookOpen className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{courses.length}</div>\n <p className=\"text-xs text-text-secondary\">Active courses</p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Enrolled</CardTitle>\n <Users className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{totalEnrolled}</div>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\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 <GraduationCap className=\"h-4 w-4 text-status-success-text\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{totalCompleted}</div>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Paths</CardTitle>\n <TrendingUp className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{learningPaths.length}</div>\n </CardContent>\n </GlassCard>\n </div>\n <div>\n <h2 className=\"text-lg font-medium mb-3\">Featured Courses</h2>\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-3\">\n {courses.slice(0, 3).map((course) => (\n <Card key={course.id}>\n <CardHeader>\n <CardTitle className=\"text-base\">{course.title}</CardTitle>\n <CardDescription>\n {course.instructor} · {course.duration}\n </CardDescription>\n </CardHeader>\n <CardContent>\n <p className=\"text-sm text-text-secondary mb-3\">{course.description}</p>\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-1\">\n <Star className=\"h-3 w-3 text-status-warning-text\" />\n <span className=\"text-sm\">{course.rating}</span>\n </div>\n <div className=\"flex gap-1\">\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {course.level}\n </Badge>\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {course.category}\n </Badge>\n </div>\n </div>\n <div className=\"mt-2 text-xs text-text-secondary\">\n {course.enrolled} enrolled · {course.completed} completed\n </div>\n </CardContent>\n </Card>\n ))}\n </div>\n </div>\n <div>\n <h2 className=\"text-lg font-medium mb-3\">Learning Paths</h2>\n <div className=\"grid gap-4 md:grid-cols-3\">\n {learningPaths.map((path) => (\n <Card key={path.id}>\n <CardHeader>\n <CardTitle className=\"text-base\">{path.title}</CardTitle>\n <CardDescription>{path.description}</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"flex items-center justify-between text-sm text-text-secondary\">\n <span>\n {path.courses.length} courses · {path.duration}\n </span>\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {path.level}\n </Badge>\n </div>\n <div className=\"mt-2 space-y-1\">\n <div className=\"flex justify-between text-xs\">\n <span>{path.enrolled} enrolled</span>\n <span>{path.completionRate}%</span>\n </div>\n <div className=\"h-2 bg-bg-sunken rounded overflow-hidden\">\n <div\n className=\"h-2 bg-action-primary-bg rounded\"\n style={{ width: `${path.completionRate}%` }}\n />\n </div>\n </div>\n </CardContent>\n </Card>\n ))}\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;AAcA,SAAgB,IAA2B;CACzC,IAAM,EAAE,YAAS,qBAAkB,GAAqB,EAClD,IAAgB,EAAQ,QAAQ,GAAG,MAAM,IAAI,EAAE,UAAU,EAAE,EAC3D,IAAiB,EAAQ,QAAQ,GAAG,MAAM,IAAI,EAAE,WAAW,EAAE;AAEnE,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD,EAAA,UAAA;IACE,kBAAC,MAAD;KAAI,WAAU;eACZ,kBAAC,GAAD,EAAA,UAAc,0BAAqC,CAAA;KAChD,CAAA;IACL,kBAAC,KAAD;KAAG,WAAU;eAA8B;KAEvC,CAAA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Z,EAAc,KAAK,MAClB,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;KAAW,WAAU;eAAa,EAAK;KAAkB,CAAA,EACzD,kBAAC,GAAD,EAAA,UAAkB,EAAK,aAA8B,CAAA,CAC1C,EAAA,CAAA,EACb,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,QAAD,EAAA,UAAA;MACG,EAAK,QAAQ;MAAO;MAAY,EAAK;MACjC,EAAA,CAAA,EACP,kBAAC,GAAD;MAAO,SAAQ;MAAU,WAAU;gBAChC,EAAK;MACA,CAAA,CACJ;QACN,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,QAAD,EAAA,UAAA,CAAO,EAAK,UAAS,YAAgB,EAAA,CAAA,EACrC,kBAAC,QAAD,EAAA,UAAA,CAAO,EAAK,gBAAe,IAAQ,EAAA,CAAA,CAC/B;SACN,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,OAAD;OACE,WAAU;OACV,OAAO,EAAE,OAAO,GAAG,EAAK,eAAe,IAAI;OAC3C,CAAA;MACE,CAAA,CACF;OACM,EAAA,CAAA,CACT,EAAA,EA3BI,EAAK,GA2BT,CACP;IACE,CAAA,CACF,EAAA,CAAA;GACF"}
|
|
@@ -1,93 +1,113 @@
|
|
|
1
1
|
import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { useState as t } from "react";
|
|
3
|
+
import { BookOpen as n, CheckCircle as r, Clock as i, Star as a, Users as o } from "lucide-react";
|
|
4
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
|
+
import { Badge as l, Button as u, Card as d, CardContent as f, EmphasisPanel as p, GradientText as m, IllustratedEmptyState as h, PagePurpose as g } from "@burdenoff/fe-libs/ui";
|
|
6
|
+
import { useGlobalUi as _ } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
5
7
|
//#region src/crewfoundry/pages/LearningLearningPathDetailPagePage.tsx
|
|
6
|
-
function
|
|
7
|
-
let { learningPaths:
|
|
8
|
-
if (!
|
|
8
|
+
function v() {
|
|
9
|
+
let { learningPaths: v, courses: y, enrollCourse: b } = e(), { showToast: x } = _(), [S, C] = t(!1), w = v[0];
|
|
10
|
+
if (!w) return /* @__PURE__ */ s("div", {
|
|
9
11
|
className: "p-6",
|
|
10
|
-
children: /* @__PURE__ */
|
|
12
|
+
children: /* @__PURE__ */ s(h, {
|
|
11
13
|
illustration: "empty-search",
|
|
12
14
|
title: "No learning path found",
|
|
13
15
|
description: "This learning path is no longer available."
|
|
14
16
|
})
|
|
15
17
|
});
|
|
16
|
-
let
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
+
let T = y.filter((e) => w.courses.includes(e.id));
|
|
19
|
+
return /* @__PURE__ */ c("div", {
|
|
18
20
|
className: "space-y-6 p-6 max-w-4xl",
|
|
19
21
|
children: [
|
|
20
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */ c("div", {
|
|
21
23
|
className: "flex items-center justify-between",
|
|
22
|
-
children: [/* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
+
children: [/* @__PURE__ */ c("div", { children: [
|
|
25
|
+
/* @__PURE__ */ s("h1", {
|
|
24
26
|
className: "text-2xl font-semibold",
|
|
25
|
-
children: /* @__PURE__ */
|
|
27
|
+
children: /* @__PURE__ */ s(m, { children: w.title })
|
|
26
28
|
}),
|
|
27
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ s("p", {
|
|
28
30
|
className: "text-sm text-text-secondary",
|
|
29
|
-
children:
|
|
31
|
+
children: w.description
|
|
30
32
|
}),
|
|
31
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ s(g, {
|
|
32
34
|
className: "mt-1",
|
|
33
35
|
children: "Follow a single learning path end-to-end — see its courses, your progress, and what to complete next to finish the journey."
|
|
34
36
|
})
|
|
35
|
-
] }), /* @__PURE__ */
|
|
37
|
+
] }), /* @__PURE__ */ s(u, {
|
|
38
|
+
onClick: async () => {
|
|
39
|
+
if (T.length === 0) {
|
|
40
|
+
x("No courses in this path yet", "warning");
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
C(!0);
|
|
44
|
+
try {
|
|
45
|
+
for (let e of T) await b(e.id);
|
|
46
|
+
x(`Enrolled in ${T.length} course${T.length > 1 ? "s" : ""}`, "success");
|
|
47
|
+
} catch (e) {
|
|
48
|
+
x(e instanceof Error ? e.message : "Unable to enroll in path", "error");
|
|
49
|
+
} finally {
|
|
50
|
+
C(!1);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
disabled: S,
|
|
54
|
+
children: S ? "Enrolling…" : "Enroll Now"
|
|
55
|
+
})]
|
|
36
56
|
}),
|
|
37
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ c("div", {
|
|
38
58
|
className: "grid gap-4 md:grid-cols-4",
|
|
39
59
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ s(d, { children: /* @__PURE__ */ c(f, {
|
|
41
61
|
className: "p-4 text-center",
|
|
42
62
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ s(n, { className: "h-5 w-5 mx-auto text-text-secondary mb-1" }),
|
|
64
|
+
/* @__PURE__ */ s("p", {
|
|
45
65
|
className: "text-lg font-bold",
|
|
46
|
-
children:
|
|
66
|
+
children: w.courses.length
|
|
47
67
|
}),
|
|
48
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ s("p", {
|
|
49
69
|
className: "text-xs text-text-secondary",
|
|
50
70
|
children: "Courses"
|
|
51
71
|
})
|
|
52
72
|
]
|
|
53
73
|
}) }),
|
|
54
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ s(d, { children: /* @__PURE__ */ c(f, {
|
|
55
75
|
className: "p-4 text-center",
|
|
56
76
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ s(i, { className: "h-5 w-5 mx-auto text-text-secondary mb-1" }),
|
|
78
|
+
/* @__PURE__ */ s("p", {
|
|
59
79
|
className: "text-lg font-bold",
|
|
60
|
-
children:
|
|
80
|
+
children: w.duration
|
|
61
81
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ s("p", {
|
|
63
83
|
className: "text-xs text-text-secondary",
|
|
64
84
|
children: "Duration"
|
|
65
85
|
})
|
|
66
86
|
]
|
|
67
87
|
}) }),
|
|
68
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ s(d, { children: /* @__PURE__ */ c(f, {
|
|
69
89
|
className: "p-4 text-center",
|
|
70
90
|
children: [
|
|
71
|
-
/* @__PURE__ */ o
|
|
72
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ s(o, { className: "h-5 w-5 mx-auto text-text-secondary mb-1" }),
|
|
92
|
+
/* @__PURE__ */ s("p", {
|
|
73
93
|
className: "text-lg font-bold",
|
|
74
|
-
children:
|
|
94
|
+
children: w.enrolled
|
|
75
95
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ s("p", {
|
|
77
97
|
className: "text-xs text-text-secondary",
|
|
78
98
|
children: "Enrolled"
|
|
79
99
|
})
|
|
80
100
|
]
|
|
81
101
|
}) }),
|
|
82
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ s(d, { children: /* @__PURE__ */ c(f, {
|
|
83
103
|
className: "p-4 text-center",
|
|
84
104
|
children: [
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ s(r, { className: "h-5 w-5 mx-auto text-status-success-text mb-1" }),
|
|
106
|
+
/* @__PURE__ */ c("p", {
|
|
87
107
|
className: "text-lg font-bold",
|
|
88
|
-
children: [
|
|
108
|
+
children: [w.completionRate, "%"]
|
|
89
109
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ s("p", {
|
|
91
111
|
className: "text-xs text-text-secondary",
|
|
92
112
|
children: "Completion"
|
|
93
113
|
})
|
|
@@ -95,38 +115,38 @@ function g() {
|
|
|
95
115
|
}) })
|
|
96
116
|
]
|
|
97
117
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ c(p, { children: [
|
|
119
|
+
/* @__PURE__ */ s("div", {
|
|
100
120
|
className: "text-lg font-semibold",
|
|
101
121
|
children: "Courses in this Path"
|
|
102
122
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ c("p", {
|
|
104
124
|
className: "mb-4 text-sm text-text-secondary",
|
|
105
125
|
children: [
|
|
106
|
-
|
|
126
|
+
T.length,
|
|
107
127
|
" courses · ",
|
|
108
|
-
|
|
128
|
+
w.level
|
|
109
129
|
]
|
|
110
130
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ s("div", {
|
|
112
132
|
className: "space-y-3",
|
|
113
|
-
children:
|
|
133
|
+
children: T.length === 0 ? /* @__PURE__ */ s(h, {
|
|
114
134
|
illustration: "empty-generic",
|
|
115
135
|
title: "No courses in this path yet",
|
|
116
136
|
description: "Courses added to this path will appear here in order."
|
|
117
|
-
}) :
|
|
137
|
+
}) : T.map((e, t) => /* @__PURE__ */ c("div", {
|
|
118
138
|
className: "flex items-center gap-3 rounded border p-4",
|
|
119
139
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ s("div", {
|
|
121
141
|
className: "flex-shrink-0 w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-bold",
|
|
122
142
|
children: t + 1
|
|
123
143
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ c("div", {
|
|
125
145
|
className: "flex-1",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
146
|
+
children: [/* @__PURE__ */ s("p", {
|
|
127
147
|
className: "text-sm font-medium",
|
|
128
148
|
children: e.title
|
|
129
|
-
}), /* @__PURE__ */
|
|
149
|
+
}), /* @__PURE__ */ c("p", {
|
|
130
150
|
className: "text-xs text-text-secondary",
|
|
131
151
|
children: [
|
|
132
152
|
e.instructor,
|
|
@@ -138,15 +158,15 @@ function g() {
|
|
|
138
158
|
]
|
|
139
159
|
})]
|
|
140
160
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ c("div", {
|
|
142
162
|
className: "flex items-center gap-2",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
163
|
+
children: [/* @__PURE__ */ c("div", {
|
|
144
164
|
className: "flex items-center gap-1",
|
|
145
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ s(a, { className: "h-3 w-3 text-status-warning-text" }), /* @__PURE__ */ s("span", {
|
|
146
166
|
className: "text-sm",
|
|
147
167
|
children: e.rating
|
|
148
168
|
})]
|
|
149
|
-
}), /* @__PURE__ */
|
|
169
|
+
}), /* @__PURE__ */ s(l, {
|
|
150
170
|
variant: e.level === "beginner" ? "secondary" : e.level === "intermediate" ? "default" : "destructive",
|
|
151
171
|
className: "text-[10px]",
|
|
152
172
|
children: e.level
|
|
@@ -160,6 +180,6 @@ function g() {
|
|
|
160
180
|
});
|
|
161
181
|
}
|
|
162
182
|
//#endregion
|
|
163
|
-
export {
|
|
183
|
+
export { v as LearningLearningPathDetailPagePage };
|
|
164
184
|
|
|
165
185
|
//# sourceMappingURL=LearningLearningPathDetailPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LearningLearningPathDetailPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningLearningPathDetailPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Button,\n Card,\n CardContent,\n EmphasisPanel,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { BookOpen, CheckCircle, Clock, Star, Users } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function LearningLearningPathDetailPagePage() {\n const { learningPaths, courses } = useCrewFoundryStore();\n const path = learningPaths[0];\n if (!path)\n return (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-search\"\n title=\"No learning path found\"\n description=\"This learning path is no longer available.\"\n />\n </div>\n );\n const pathCourses = courses.filter((c) => path.courses.includes(c.id));\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 <h1 className=\"text-2xl font-semibold\">\n <GradientText>{path.title}</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">{path.description}</p>\n <PagePurpose className=\"mt-1\">Follow a single learning path end-to-end — see its courses, your progress, and what to complete next to finish the journey.</PagePurpose>\n </div>\n <Button
|
|
1
|
+
{"version":3,"file":"LearningLearningPathDetailPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningLearningPathDetailPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Button,\n Card,\n CardContent,\n EmphasisPanel,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { BookOpen, CheckCircle, Clock, Star, Users } from 'lucide-react';\nimport { useState } from 'react';\nimport { useGlobalUi } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function LearningLearningPathDetailPagePage() {\n const { learningPaths, courses, enrollCourse } = useCrewFoundryStore();\n const { showToast } = useGlobalUi();\n const [enrolling, setEnrolling] = useState(false);\n const path = learningPaths[0];\n if (!path)\n return (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-search\"\n title=\"No learning path found\"\n description=\"This learning path is no longer available.\"\n />\n </div>\n );\n const pathCourses = courses.filter((c) => path.courses.includes(c.id));\n\n const handleEnroll = async () => {\n if (pathCourses.length === 0) {\n showToast('No courses in this path yet', 'warning');\n return;\n }\n setEnrolling(true);\n try {\n for (const course of pathCourses) {\n await enrollCourse(course.id);\n }\n showToast(\n `Enrolled in ${pathCourses.length} course${pathCourses.length > 1 ? 's' : ''}`,\n 'success'\n );\n } catch (error) {\n showToast(error instanceof Error ? error.message : 'Unable to enroll in path', 'error');\n } finally {\n setEnrolling(false);\n }\n };\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 <h1 className=\"text-2xl font-semibold\">\n <GradientText>{path.title}</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">{path.description}</p>\n <PagePurpose className=\"mt-1\">Follow a single learning path end-to-end — see its courses, your progress, and what to complete next to finish the journey.</PagePurpose>\n </div>\n <Button onClick={handleEnroll} disabled={enrolling}>\n {enrolling ? 'Enrolling…' : 'Enroll Now'}\n </Button>\n </div>\n <div className=\"grid gap-4 md:grid-cols-4\">\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\">{path.courses.length}</p>\n <p className=\"text-xs text-text-secondary\">Courses</p>\n </CardContent>\n </Card>\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\">{path.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 <Users className=\"h-5 w-5 mx-auto text-text-secondary mb-1\" />\n <p className=\"text-lg font-bold\">{path.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 <CheckCircle className=\"h-5 w-5 mx-auto text-status-success-text mb-1\" />\n <p className=\"text-lg font-bold\">{path.completionRate}%</p>\n <p className=\"text-xs text-text-secondary\">Completion</p>\n </CardContent>\n </Card>\n </div>\n <EmphasisPanel>\n <div className=\"text-lg font-semibold\">Courses in this Path</div>\n <p className=\"mb-4 text-sm text-text-secondary\">\n {pathCourses.length} courses · {path.level}\n </p>\n <div className=\"space-y-3\">\n {pathCourses.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"No courses in this path yet\"\n description=\"Courses added to this path will appear here in order.\"\n />\n ) : (\n pathCourses.map((course, idx) => (\n <div key={course.id} className=\"flex items-center gap-3 rounded border p-4\">\n <div className=\"flex-shrink-0 w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-bold\">\n {idx + 1}\n </div>\n <div className=\"flex-1\">\n <p className=\"text-sm font-medium\">{course.title}</p>\n <p className=\"text-xs text-text-secondary\">\n {course.instructor} · {course.duration} · {course.modules} modules\n </p>\n </div>\n <div className=\"flex items-center gap-2\">\n <div className=\"flex items-center gap-1\">\n <Star className=\"h-3 w-3 text-status-warning-text\" />\n <span className=\"text-sm\">{course.rating}</span>\n </div>\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 </div>\n ))\n )}\n </div>\n </EmphasisPanel>\n </div>\n );\n}\n"],"mappings":";;;;;;;AAeA,SAAgB,IAAqC;CACnD,IAAM,EAAE,kBAAe,YAAS,oBAAiB,GAAqB,EAChE,EAAE,iBAAc,GAAa,EAC7B,CAAC,GAAW,KAAgB,EAAS,GAAM,EAC3C,IAAO,EAAc;AAC3B,KAAI,CAAC,EACH,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD;GACE,cAAa;GACb,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kBAAf,CACE,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,GAAD,EAAM,WAAU,oCAAqC,CAAA,EACrD,kBAAC,QAAD;UAAM,WAAU;oBAAW,EAAO;UAAc,CAAA,CAC5C;YACN,kBAAC,GAAD;SACE,SACE,EAAO,UAAU,aACb,cACA,EAAO,UAAU,iBACf,YACA;SAER,WAAU;mBAET,EAAO;SACF,CAAA,CACJ;;OACF;QA5BI,EAAO,GA4BX,CACJ;KAEA,CAAA;IACQ,EAAA,CAAA;GACZ"}
|
|
@@ -1,90 +1,163 @@
|
|
|
1
1
|
import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { FormModal as t, useFormModal as n } from "../components/forms/FormModal.js";
|
|
3
|
+
import { BookOpen as r, GraduationCap as i, Plus as a } from "lucide-react";
|
|
4
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
+
import { Badge as c, Button as l, CardContent as u, CardDescription as d, CardHeader as f, CardTitle as p, GlassCard as m, GradientText as h, IllustratedEmptyState as g, PagePurpose as _ } from "@burdenoff/fe-libs/ui";
|
|
5
6
|
//#region src/crewfoundry/pages/LearningLearningPathsPagePage.tsx
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
var v = [
|
|
8
|
+
{
|
|
9
|
+
name: "title",
|
|
10
|
+
label: "Path Title",
|
|
11
|
+
type: "text",
|
|
12
|
+
required: !0,
|
|
13
|
+
colSpan: 2
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: "description",
|
|
17
|
+
label: "Description",
|
|
18
|
+
type: "textarea",
|
|
19
|
+
required: !0,
|
|
20
|
+
colSpan: 2
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "duration",
|
|
24
|
+
label: "Duration",
|
|
25
|
+
type: "text",
|
|
26
|
+
required: !0,
|
|
27
|
+
placeholder: "e.g. 3 months"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "level",
|
|
31
|
+
label: "Level",
|
|
32
|
+
type: "select",
|
|
33
|
+
required: !0,
|
|
34
|
+
options: [
|
|
35
|
+
{
|
|
36
|
+
label: "Beginner",
|
|
37
|
+
value: "beginner"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: "Intermediate",
|
|
41
|
+
value: "intermediate"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
label: "Advanced",
|
|
45
|
+
value: "advanced"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
];
|
|
50
|
+
function y() {
|
|
51
|
+
let { learningPaths: y, courses: b, addLearningPath: x } = e(), S = n();
|
|
52
|
+
return /* @__PURE__ */ s("div", {
|
|
9
53
|
className: "space-y-6 p-6",
|
|
10
|
-
children: [
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
className: "
|
|
13
|
-
children: /* @__PURE__ */
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ s("div", {
|
|
56
|
+
className: "flex flex-wrap items-start justify-between gap-3",
|
|
57
|
+
children: [/* @__PURE__ */ s("div", { children: [
|
|
58
|
+
/* @__PURE__ */ o("h1", {
|
|
59
|
+
className: "text-2xl font-semibold",
|
|
60
|
+
children: /* @__PURE__ */ o(h, { children: "Learning Paths" })
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ o("p", {
|
|
63
|
+
className: "text-sm text-text-secondary",
|
|
64
|
+
children: "Structured learning journeys for career growth"
|
|
65
|
+
}),
|
|
66
|
+
/* @__PURE__ */ o(_, {
|
|
67
|
+
className: "mt-1",
|
|
68
|
+
children: "Structured learning journeys that string courses together — follow a path to build toward a role or skill set step by step."
|
|
69
|
+
})
|
|
70
|
+
] }), /* @__PURE__ */ s(l, {
|
|
71
|
+
onClick: () => S.openModal(),
|
|
72
|
+
children: [/* @__PURE__ */ o(a, { className: "mr-1 h-4 w-4" }), "Create Path"]
|
|
73
|
+
})]
|
|
14
74
|
}),
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
className: "
|
|
17
|
-
children:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
75
|
+
/* @__PURE__ */ o("div", {
|
|
76
|
+
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
77
|
+
children: y.length === 0 ? /* @__PURE__ */ o("div", {
|
|
78
|
+
className: "col-span-full",
|
|
79
|
+
children: /* @__PURE__ */ o(g, {
|
|
80
|
+
illustration: "empty-generic",
|
|
81
|
+
title: "No learning paths yet",
|
|
82
|
+
description: "Learning paths will appear here once they are created."
|
|
83
|
+
})
|
|
84
|
+
}) : y.map((e, t) => {
|
|
85
|
+
let n = b.filter((t) => e.courses.includes(t.id));
|
|
86
|
+
return /* @__PURE__ */ s(m, {
|
|
87
|
+
treatment: t === 0 ? "glass" : "plain",
|
|
88
|
+
glow: t === 0,
|
|
89
|
+
className: "hover:shadow-md transition-shadow cursor-pointer",
|
|
90
|
+
children: [/* @__PURE__ */ s(f, { children: [/* @__PURE__ */ o(p, {
|
|
91
|
+
className: "text-lg",
|
|
92
|
+
children: e.title
|
|
93
|
+
}), /* @__PURE__ */ o(d, { children: e.description })] }), /* @__PURE__ */ o(u, { children: /* @__PURE__ */ s("div", {
|
|
94
|
+
className: "space-y-3",
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ s("div", {
|
|
97
|
+
className: "flex items-center justify-between text-sm text-text-secondary",
|
|
98
|
+
children: [/* @__PURE__ */ s("span", {
|
|
99
|
+
className: "flex items-center gap-1",
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ o(r, { className: "h-3 w-3" }),
|
|
102
|
+
e.courses.length,
|
|
103
|
+
" courses"
|
|
104
|
+
]
|
|
105
|
+
}), /* @__PURE__ */ o("span", { children: e.duration })]
|
|
106
|
+
}),
|
|
107
|
+
/* @__PURE__ */ o(c, {
|
|
108
|
+
variant: "outline",
|
|
109
|
+
className: "text-[10px]",
|
|
110
|
+
children: e.level
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ o("div", {
|
|
113
|
+
className: "space-y-1 mt-2",
|
|
114
|
+
children: n.map((e) => /* @__PURE__ */ s("div", {
|
|
115
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
116
|
+
children: [/* @__PURE__ */ o(i, { className: "h-3 w-3" }), e.title]
|
|
117
|
+
}, e.id))
|
|
118
|
+
}),
|
|
119
|
+
/* @__PURE__ */ s("div", {
|
|
120
|
+
className: "pt-2 border-t",
|
|
121
|
+
children: [/* @__PURE__ */ s("div", {
|
|
122
|
+
className: "flex justify-between text-xs mb-1",
|
|
123
|
+
children: [/* @__PURE__ */ s("span", { children: [e.enrolled, " enrolled"] }), /* @__PURE__ */ s("span", { children: [e.completionRate, "%"] })]
|
|
124
|
+
}), /* @__PURE__ */ o("div", {
|
|
125
|
+
className: "h-2 bg-bg-sunken rounded overflow-hidden",
|
|
126
|
+
children: /* @__PURE__ */ o("div", {
|
|
127
|
+
className: "h-2 bg-action-primary-bg rounded",
|
|
128
|
+
style: { width: `${e.completionRate}%` }
|
|
129
|
+
})
|
|
130
|
+
})]
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
}) })]
|
|
134
|
+
}, e.id);
|
|
31
135
|
})
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
]
|
|
53
|
-
}), /* @__PURE__ */ r("span", { children: e.duration })]
|
|
54
|
-
}),
|
|
55
|
-
/* @__PURE__ */ r(a, {
|
|
56
|
-
variant: "outline",
|
|
57
|
-
className: "text-[10px]",
|
|
58
|
-
children: e.level
|
|
59
|
-
}),
|
|
60
|
-
/* @__PURE__ */ r("div", {
|
|
61
|
-
className: "space-y-1 mt-2",
|
|
62
|
-
children: f.map((e) => /* @__PURE__ */ i("div", {
|
|
63
|
-
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
64
|
-
children: [/* @__PURE__ */ r(n, { className: "h-3 w-3" }), e.title]
|
|
65
|
-
}, e.id))
|
|
66
|
-
}),
|
|
67
|
-
/* @__PURE__ */ i("div", {
|
|
68
|
-
className: "pt-2 border-t",
|
|
69
|
-
children: [/* @__PURE__ */ i("div", {
|
|
70
|
-
className: "flex justify-between text-xs mb-1",
|
|
71
|
-
children: [/* @__PURE__ */ i("span", { children: [e.enrolled, " enrolled"] }), /* @__PURE__ */ i("span", { children: [e.completionRate, "%"] })]
|
|
72
|
-
}), /* @__PURE__ */ r("div", {
|
|
73
|
-
className: "h-2 bg-bg-sunken rounded overflow-hidden",
|
|
74
|
-
children: /* @__PURE__ */ r("div", {
|
|
75
|
-
className: "h-2 bg-action-primary-bg rounded",
|
|
76
|
-
style: { width: `${e.completionRate}%` }
|
|
77
|
-
})
|
|
78
|
-
})]
|
|
79
|
-
})
|
|
80
|
-
]
|
|
81
|
-
}) })]
|
|
82
|
-
}, e.id);
|
|
136
|
+
}),
|
|
137
|
+
/* @__PURE__ */ o(t, {
|
|
138
|
+
open: S.open,
|
|
139
|
+
onOpenChange: S.onOpenChange,
|
|
140
|
+
title: "Create Learning Path",
|
|
141
|
+
description: "Group courses into a structured journey. You can add courses after creating the path.",
|
|
142
|
+
fields: v,
|
|
143
|
+
submitLabel: "Create Path",
|
|
144
|
+
onSubmit: async (e) => {
|
|
145
|
+
await x({
|
|
146
|
+
id: `path-${Date.now()}`,
|
|
147
|
+
title: String(e.title ?? ""),
|
|
148
|
+
description: String(e.description ?? ""),
|
|
149
|
+
courses: [],
|
|
150
|
+
duration: String(e.duration ?? ""),
|
|
151
|
+
level: String(e.level ?? "beginner"),
|
|
152
|
+
enrolled: 0,
|
|
153
|
+
completionRate: 0
|
|
154
|
+
});
|
|
155
|
+
}
|
|
83
156
|
})
|
|
84
|
-
|
|
157
|
+
]
|
|
85
158
|
});
|
|
86
159
|
}
|
|
87
160
|
//#endregion
|
|
88
|
-
export {
|
|
161
|
+
export { y as LearningLearningPathsPagePage };
|
|
89
162
|
|
|
90
163
|
//# sourceMappingURL=LearningLearningPathsPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LearningLearningPathsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningLearningPathsPagePage.tsx"],"sourcesContent":["import {\n Badge,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { BookOpen, GraduationCap,
|
|
1
|
+
{"version":3,"file":"LearningLearningPathsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningLearningPathsPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Button,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { BookOpen, GraduationCap, Plus } from 'lucide-react';\nimport { useCrewFoundryStore, type LearningPath } from '../store/crewfoundryStore';\nimport { FormModal, useFormModal, type FieldConfig, type FormValues } from '../components/forms/FormModal';\n\nconst PATH_FIELDS: FieldConfig[] = [\n { name: 'title', label: 'Path Title', type: 'text', required: true, colSpan: 2 },\n { name: 'description', label: 'Description', type: 'textarea', required: true, colSpan: 2 },\n { name: 'duration', label: 'Duration', type: 'text', required: true, placeholder: 'e.g. 3 months' },\n {\n name: 'level',\n label: 'Level',\n type: 'select',\n required: true,\n options: [\n { label: 'Beginner', value: 'beginner' },\n { label: 'Intermediate', value: 'intermediate' },\n { label: 'Advanced', value: 'advanced' },\n ],\n },\n];\n\nexport function LearningLearningPathsPagePage() {\n const { learningPaths, courses, addLearningPath } = useCrewFoundryStore();\n const createModal = useFormModal();\n\n const handleCreate = async (values: FormValues) => {\n const path: LearningPath = {\n id: `path-${Date.now()}`,\n title: String(values.title ?? ''),\n description: String(values.description ?? ''),\n courses: [],\n duration: String(values.duration ?? ''),\n level: String(values.level ?? 'beginner'),\n enrolled: 0,\n completionRate: 0,\n };\n await addLearningPath(path);\n };\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex flex-wrap items-start justify-between gap-3\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Learning Paths</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n Structured learning journeys for career growth\n </p>\n <PagePurpose className=\"mt-1\">Structured learning journeys that string courses together — follow a path to build toward a role or skill set step by step.</PagePurpose>\n </div>\n <Button onClick={() => createModal.openModal()}>\n <Plus className=\"mr-1 h-4 w-4\" />\n Create Path\n </Button>\n </div>\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-3\">\n {learningPaths.length === 0 ? (\n <div className=\"col-span-full\">\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"No learning paths yet\"\n description=\"Learning paths will appear here once they are created.\"\n />\n </div>\n ) : (\n learningPaths.map((path, _idx) => {\n const pathCourses = courses.filter((c) => path.courses.includes(c.id));\n return (\n <GlassCard\n key={path.id}\n treatment={_idx === 0 ? 'glass' : 'plain'}\n glow={_idx === 0}\n className=\"hover:shadow-md transition-shadow cursor-pointer\"\n >\n <CardHeader>\n <CardTitle className=\"text-lg\">{path.title}</CardTitle>\n <CardDescription>{path.description}</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between text-sm text-text-secondary\">\n <span className=\"flex items-center gap-1\">\n <BookOpen className=\"h-3 w-3\" />\n {path.courses.length} courses\n </span>\n <span>{path.duration}</span>\n </div>\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {path.level}\n </Badge>\n <div className=\"space-y-1 mt-2\">\n {pathCourses.map((c) => (\n <div\n key={c.id}\n className=\"flex items-center gap-2 text-xs text-text-secondary\"\n >\n <GraduationCap className=\"h-3 w-3\" />\n {c.title}\n </div>\n ))}\n </div>\n <div className=\"pt-2 border-t\">\n <div className=\"flex justify-between text-xs mb-1\">\n <span>{path.enrolled} enrolled</span>\n <span>{path.completionRate}%</span>\n </div>\n <div className=\"h-2 bg-bg-sunken rounded overflow-hidden\">\n <div\n className=\"h-2 bg-action-primary-bg rounded\"\n style={{ width: `${path.completionRate}%` }}\n />\n </div>\n </div>\n </div>\n </CardContent>\n </GlassCard>\n );\n })\n )}\n </div>\n\n <FormModal\n open={createModal.open}\n onOpenChange={createModal.onOpenChange}\n title=\"Create Learning Path\"\n description=\"Group courses into a structured journey. You can add courses after creating the path.\"\n fields={PATH_FIELDS}\n submitLabel=\"Create Path\"\n onSubmit={handleCreate}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;AAgBA,IAAM,IAA6B;CACjC;EAAE,MAAM;EAAS,OAAO;EAAc,MAAM;EAAQ,UAAU;EAAM,SAAS;EAAG;CAChF;EAAE,MAAM;EAAe,OAAO;EAAe,MAAM;EAAY,UAAU;EAAM,SAAS;EAAG;CAC3F;EAAE,MAAM;EAAY,OAAO;EAAY,MAAM;EAAQ,UAAU;EAAM,aAAa;EAAiB;CACnG;EACE,MAAM;EACN,OAAO;EACP,MAAM;EACN,UAAU;EACV,SAAS;GACP;IAAE,OAAO;IAAY,OAAO;IAAY;GACxC;IAAE,OAAO;IAAgB,OAAO;IAAgB;GAChD;IAAE,OAAO;IAAY,OAAO;IAAY;GACzC;EACF;CACF;AAED,SAAgB,IAAgC;CAC9C,IAAM,EAAE,kBAAe,YAAS,uBAAoB,GAAqB,EACnE,IAAc,GAAc;AAgBlC,QACE,kBAAC,OAAD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