@burdenoff/microfe-crewfoundry 2026.704.3 → 2026.704.5
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 +76 -75
- package/dist/crewfoundry/pages/AdminAdminPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js +118 -117
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js +115 -114
- package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +105 -104
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js +52 -51
- package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +94 -93
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js +97 -96
- package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +68 -67
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js +96 -95
- package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js +153 -152
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js +111 -110
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringApplicationsPagePage.js +77 -76
- package/dist/crewfoundry/pages/HiringApplicationsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +80 -79
- 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 +102 -101
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +126 -125
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobsPagePage.js +64 -63
- package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +96 -95
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +129 -127
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrPayrollPagePage.js +118 -117
- package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +123 -122
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js +1 -1
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.js +1 -1
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js +77 -76
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js +49 -48
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js +62 -61
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPagePage.js +72 -71
- package/dist/crewfoundry/pages/LearningLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +70 -69
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js +57 -56
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js +58 -57
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js +122 -121
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js +2 -2
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js +70 -69
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js +41 -40
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js +65 -64
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js +75 -74
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js +4 -4
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js +60 -59
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js +53 -52
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js +37 -36
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.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 +126 -125
- package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js +62 -61
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js +50 -49
- package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js +72 -71
- package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js +40 -39
- package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js +134 -133
- package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js +60 -59
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.js +177 -146
- package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
- package/dist/crewfoundry/utils/formatEnumLabel.js +8 -0
- package/dist/crewfoundry/utils/formatEnumLabel.js.map +1 -0
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ function s() {
|
|
|
25
25
|
description: "Course assessments — question banks, timed attempts, scoring and pass thresholds — are being built. Once available, the quizzes tied to your enrolled courses will appear here.",
|
|
26
26
|
action: /* @__PURE__ */ t(r, {
|
|
27
27
|
variant: "outline",
|
|
28
|
-
onClick: () => s("
|
|
28
|
+
onClick: () => s("../learning/courses-page"),
|
|
29
29
|
children: "Browse courses"
|
|
30
30
|
})
|
|
31
31
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LearningAssessmentsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningAssessmentsPagePage.tsx"],"sourcesContent":["import { Button, GradientText, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { useNavigate } from 'react-router-dom';\n\nexport function LearningAssessmentsPagePage() {\n const navigate = useNavigate();\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Assessments</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">Quizzes and exams for your enrolled courses</p>\n <PagePurpose className=\"mt-1\">\n Create and review assessments that measure what your team has learned — use them to\n certify skills and identify knowledge gaps.\n </PagePurpose>\n </div>\n\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"Assessments are coming soon\"\n description=\"Course assessments — question banks, timed attempts, scoring and pass thresholds — are being built. Once available, the quizzes tied to your enrolled courses will appear here.\"\n action={\n <Button variant=\"outline\" onClick={() => navigate('
|
|
1
|
+
{"version":3,"file":"LearningAssessmentsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningAssessmentsPagePage.tsx"],"sourcesContent":["import { Button, GradientText, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { useNavigate } from 'react-router-dom';\n\nexport function LearningAssessmentsPagePage() {\n const navigate = useNavigate();\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Assessments</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">Quizzes and exams for your enrolled courses</p>\n <PagePurpose className=\"mt-1\">\n Create and review assessments that measure what your team has learned — use them to\n certify skills and identify knowledge gaps.\n </PagePurpose>\n </div>\n\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"Assessments are coming soon\"\n description=\"Course assessments — question banks, timed attempts, scoring and pass thresholds — are being built. Once available, the quizzes tied to your enrolled courses will appear here.\"\n action={\n <Button variant=\"outline\" onClick={() => navigate('../learning/courses-page')}>\n Browse courses\n </Button>\n }\n />\n </div>\n );\n}\n"],"mappings":";;;;AAGA,SAAgB,IAA8B;CAC5C,IAAM,IAAW,GAAa;AAE9B,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD,EAAA,UAAA;GACE,kBAAC,MAAD;IAAI,WAAU;cACZ,kBAAC,GAAD,EAAA,UAAc,eAA0B,CAAA;IACrC,CAAA;GACL,kBAAC,KAAD;IAAG,WAAU;cAA8B;IAA+C,CAAA;GAC1F,kBAAC,GAAD;IAAa,WAAU;cAAO;IAGhB,CAAA;GACV,EAAA,CAAA,EAEN,kBAAC,GAAD;GACE,cAAa;GACb,OAAM;GACN,aAAY;GACZ,QACE,kBAAC,GAAD;IAAQ,SAAQ;IAAU,eAAe,EAAS,2BAA2B;cAAE;IAEtE,CAAA;GAEX,CAAA,CACE"}
|
|
@@ -25,7 +25,7 @@ function s() {
|
|
|
25
25
|
description: "Certificates are issued when a course is completed. Once certificate issuance is available, every credential you earn will appear here with its issue date and verification link.",
|
|
26
26
|
action: /* @__PURE__ */ t(r, {
|
|
27
27
|
variant: "outline",
|
|
28
|
-
onClick: () => s("
|
|
28
|
+
onClick: () => s("../learning/courses-page"),
|
|
29
29
|
children: "Browse courses"
|
|
30
30
|
})
|
|
31
31
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LearningCertificatesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningCertificatesPagePage.tsx"],"sourcesContent":["import { Button, GradientText, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { useNavigate } from 'react-router-dom';\n\nexport function LearningCertificatesPagePage() {\n const navigate = useNavigate();\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Certificates</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n Proof of completed training and validated skills\n </p>\n <PagePurpose className=\"mt-1\">\n View and manage the certificates your team has earned — proof of completed training and\n validated skills.\n </PagePurpose>\n </div>\n\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"No certificates yet\"\n description=\"Certificates are issued when a course is completed. Once certificate issuance is available, every credential you earn will appear here with its issue date and verification link.\"\n action={\n <Button variant=\"outline\" onClick={() => navigate('
|
|
1
|
+
{"version":3,"file":"LearningCertificatesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningCertificatesPagePage.tsx"],"sourcesContent":["import { Button, GradientText, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { useNavigate } from 'react-router-dom';\n\nexport function LearningCertificatesPagePage() {\n const navigate = useNavigate();\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Certificates</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n Proof of completed training and validated skills\n </p>\n <PagePurpose className=\"mt-1\">\n View and manage the certificates your team has earned — proof of completed training and\n validated skills.\n </PagePurpose>\n </div>\n\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"No certificates yet\"\n description=\"Certificates are issued when a course is completed. Once certificate issuance is available, every credential you earn will appear here with its issue date and verification link.\"\n action={\n <Button variant=\"outline\" onClick={() => navigate('../learning/courses-page')}>\n Browse courses\n </Button>\n }\n />\n </div>\n );\n}\n"],"mappings":";;;;AAGA,SAAgB,IAA+B;CAC7C,IAAM,IAAW,GAAa;AAE9B,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD,EAAA,UAAA;GACE,kBAAC,MAAD;IAAI,WAAU;cACZ,kBAAC,GAAD,EAAA,UAAc,gBAA2B,CAAA;IACtC,CAAA;GACL,kBAAC,KAAD;IAAG,WAAU;cAA8B;IAEvC,CAAA;GACJ,kBAAC,GAAD;IAAa,WAAU;cAAO;IAGhB,CAAA;GACV,EAAA,CAAA,EAEN,kBAAC,GAAD;GACE,cAAa;GACb,OAAM;GACN,aAAY;GACZ,QACE,kBAAC,GAAD;IAAQ,SAAQ;IAAU,eAAe,EAAS,2BAA2B;cAAE;IAEtE,CAAA;GAEX,CAAA,CACE"}
|
|
@@ -1,146 +1,147 @@
|
|
|
1
1
|
import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { formatEnumLabel as t } from "../utils/formatEnumLabel.js";
|
|
3
|
+
import { useState as n } from "react";
|
|
4
|
+
import { BookOpen as r, Clock as i, GraduationCap as a, Play as o, Star as s, Users as c } from "lucide-react";
|
|
5
|
+
import { useNavigate as l, useSearchParams as u } from "react-router-dom";
|
|
6
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
7
|
+
import { Badge as p, Button as m, Card as h, CardContent as g, CardHeader as _, CardTitle as v, EmphasisPanel as y, GradientText as b, IllustratedEmptyState as x, NextSteps as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
import { useGlobalUi as w } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
8
9
|
//#region src/crewfoundry/pages/LearningCourseDetailsPagePage.tsx
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
if (!
|
|
10
|
+
function T() {
|
|
11
|
+
let T = l(), [E] = u(), { courses: D, enrollCourse: O } = e(), { showToast: k } = w(), [A, j] = n(!1), M = E.get("id"), N = M ? D.find((e) => e.id === M) : D[0];
|
|
12
|
+
if (!N) return /* @__PURE__ */ d("div", {
|
|
12
13
|
className: "p-6",
|
|
13
|
-
children: /* @__PURE__ */
|
|
14
|
+
children: /* @__PURE__ */ d(x, {
|
|
14
15
|
illustration: "empty-search",
|
|
15
16
|
title: "Course not found",
|
|
16
17
|
description: "This course is no longer available."
|
|
17
18
|
})
|
|
18
19
|
});
|
|
19
|
-
let
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
let P = N.enrolled > 0 ? Math.round(N.completed / N.enrolled * 100) : 0;
|
|
21
|
+
return /* @__PURE__ */ f("div", {
|
|
21
22
|
className: "space-y-6 p-6 max-w-4xl",
|
|
22
23
|
children: [
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ f("div", {
|
|
24
25
|
className: "flex items-center justify-between",
|
|
25
|
-
children: [/* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
26
|
+
children: [/* @__PURE__ */ f("div", { children: [
|
|
27
|
+
/* @__PURE__ */ f("div", {
|
|
27
28
|
className: "flex items-center gap-2 mb-1",
|
|
28
|
-
children: [/* @__PURE__ */
|
|
29
|
+
children: [/* @__PURE__ */ d("h1", {
|
|
29
30
|
className: "text-2xl font-semibold",
|
|
30
|
-
children: /* @__PURE__ */
|
|
31
|
-
}), /* @__PURE__ */
|
|
32
|
-
variant:
|
|
33
|
-
children:
|
|
31
|
+
children: /* @__PURE__ */ d(b, { children: N.title })
|
|
32
|
+
}), /* @__PURE__ */ d(p, {
|
|
33
|
+
variant: N.level === "beginner" ? "secondary" : N.level === "intermediate" ? "default" : "destructive",
|
|
34
|
+
children: t(N.level)
|
|
34
35
|
})]
|
|
35
36
|
}),
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ f("p", {
|
|
37
38
|
className: "text-sm text-text-secondary",
|
|
38
39
|
children: [
|
|
39
40
|
"by ",
|
|
40
|
-
|
|
41
|
+
N.instructor,
|
|
41
42
|
" · ",
|
|
42
|
-
|
|
43
|
+
N.category
|
|
43
44
|
]
|
|
44
45
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ d(C, {
|
|
46
47
|
className: "mt-2",
|
|
47
48
|
children: "Everything you need to decide on and start this course — what it covers, who it's for, and how others have done — so you can enroll with confidence and build the right skills."
|
|
48
49
|
})
|
|
49
|
-
] }), /* @__PURE__ */
|
|
50
|
+
] }), /* @__PURE__ */ f(m, {
|
|
50
51
|
onClick: async () => {
|
|
51
|
-
|
|
52
|
+
j(!0);
|
|
52
53
|
try {
|
|
53
|
-
await
|
|
54
|
+
await O(N.id), k("Enrolled — your course is ready", "success");
|
|
54
55
|
} catch (e) {
|
|
55
|
-
|
|
56
|
+
k(e instanceof Error ? e.message : "Unable to enroll in course", "error");
|
|
56
57
|
} finally {
|
|
57
|
-
|
|
58
|
+
j(!1);
|
|
58
59
|
}
|
|
59
60
|
},
|
|
60
|
-
disabled:
|
|
61
|
-
children: [/* @__PURE__ */
|
|
61
|
+
disabled: A,
|
|
62
|
+
children: [/* @__PURE__ */ d(o, { className: "h-4 w-4 mr-1" }), A ? "Enrolling…" : "Start Course"]
|
|
62
63
|
})]
|
|
63
64
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ d(S, {
|
|
65
66
|
storageKey: "crewfoundry-course-details",
|
|
66
67
|
steps: [
|
|
67
68
|
{
|
|
68
69
|
id: "start",
|
|
69
70
|
label: "Start the first module",
|
|
70
71
|
description: "Begin learning and track your progress as you go.",
|
|
71
|
-
icon: /* @__PURE__ */
|
|
72
|
-
onClick: () =>
|
|
72
|
+
icon: /* @__PURE__ */ d(o, { className: "h-4 w-4" }),
|
|
73
|
+
onClick: () => T(`../learning/course-learning-page?id=${encodeURIComponent(N.id)}`)
|
|
73
74
|
},
|
|
74
75
|
{
|
|
75
76
|
id: "my-learning",
|
|
76
77
|
label: "See all your learning",
|
|
77
78
|
description: "Review everything you are currently enrolled in.",
|
|
78
|
-
icon: /* @__PURE__ */
|
|
79
|
-
onClick: () =>
|
|
79
|
+
icon: /* @__PURE__ */ d(a, { className: "h-4 w-4" }),
|
|
80
|
+
onClick: () => T("../learning/my-learning-page")
|
|
80
81
|
},
|
|
81
82
|
{
|
|
82
83
|
id: "browse",
|
|
83
84
|
label: "Browse more courses",
|
|
84
85
|
description: "Find related training to round out your skills.",
|
|
85
|
-
icon: /* @__PURE__ */
|
|
86
|
-
onClick: () =>
|
|
86
|
+
icon: /* @__PURE__ */ d(r, { className: "h-4 w-4" }),
|
|
87
|
+
onClick: () => T("../learning/courses-page")
|
|
87
88
|
}
|
|
88
89
|
]
|
|
89
90
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ f("div", {
|
|
91
92
|
className: "grid gap-4 md:grid-cols-4",
|
|
92
93
|
children: [
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ d(h, { children: /* @__PURE__ */ f(g, {
|
|
94
95
|
className: "p-4 text-center",
|
|
95
96
|
children: [
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ d(i, { className: "h-5 w-5 mx-auto text-text-secondary mb-1" }),
|
|
98
|
+
/* @__PURE__ */ d("p", {
|
|
98
99
|
className: "text-lg font-bold",
|
|
99
|
-
children:
|
|
100
|
+
children: N.duration
|
|
100
101
|
}),
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ d("p", {
|
|
102
103
|
className: "text-xs text-text-secondary",
|
|
103
104
|
children: "Duration"
|
|
104
105
|
})
|
|
105
106
|
]
|
|
106
107
|
}) }),
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ d(h, { children: /* @__PURE__ */ f(g, {
|
|
108
109
|
className: "p-4 text-center",
|
|
109
110
|
children: [
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ d(r, { className: "h-5 w-5 mx-auto text-text-secondary mb-1" }),
|
|
112
|
+
/* @__PURE__ */ d("p", {
|
|
112
113
|
className: "text-lg font-bold",
|
|
113
|
-
children:
|
|
114
|
+
children: N.modules
|
|
114
115
|
}),
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ d("p", {
|
|
116
117
|
className: "text-xs text-text-secondary",
|
|
117
118
|
children: "Modules"
|
|
118
119
|
})
|
|
119
120
|
]
|
|
120
121
|
}) }),
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ d(h, { children: /* @__PURE__ */ f(g, {
|
|
122
123
|
className: "p-4 text-center",
|
|
123
124
|
children: [
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ d(c, { className: "h-5 w-5 mx-auto text-text-secondary mb-1" }),
|
|
126
|
+
/* @__PURE__ */ d("p", {
|
|
126
127
|
className: "text-lg font-bold",
|
|
127
|
-
children:
|
|
128
|
+
children: N.enrolled
|
|
128
129
|
}),
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ d("p", {
|
|
130
131
|
className: "text-xs text-text-secondary",
|
|
131
132
|
children: "Enrolled"
|
|
132
133
|
})
|
|
133
134
|
]
|
|
134
135
|
}) }),
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ d(h, { children: /* @__PURE__ */ f(g, {
|
|
136
137
|
className: "p-4 text-center",
|
|
137
138
|
children: [
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ d(s, { className: "h-5 w-5 mx-auto text-status-warning-text mb-1" }),
|
|
140
|
+
/* @__PURE__ */ f("p", {
|
|
140
141
|
className: "text-lg font-bold",
|
|
141
|
-
children: [
|
|
142
|
+
children: [N.rating, "/5"]
|
|
142
143
|
}),
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ d("p", {
|
|
144
145
|
className: "text-xs text-text-secondary",
|
|
145
146
|
children: "Rating"
|
|
146
147
|
})
|
|
@@ -148,41 +149,41 @@ function w() {
|
|
|
148
149
|
}) })
|
|
149
150
|
]
|
|
150
151
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ f(y, { children: [
|
|
153
|
+
/* @__PURE__ */ d("div", {
|
|
153
154
|
className: "mb-2 text-lg font-semibold",
|
|
154
155
|
children: "About this Course"
|
|
155
156
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ d("p", {
|
|
157
158
|
className: "text-sm text-text-secondary",
|
|
158
|
-
children:
|
|
159
|
+
children: N.description
|
|
159
160
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ d("div", {
|
|
161
162
|
className: "flex flex-wrap gap-1 mt-3",
|
|
162
|
-
children:
|
|
163
|
+
children: N.skills.map((e) => /* @__PURE__ */ d(p, {
|
|
163
164
|
variant: "outline",
|
|
164
165
|
children: e
|
|
165
166
|
}, e))
|
|
166
167
|
})
|
|
167
168
|
] }),
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ f(h, { children: [/* @__PURE__ */ d(_, { children: /* @__PURE__ */ d(v, { children: "Completion Statistics" }) }), /* @__PURE__ */ d(g, { children: /* @__PURE__ */ f("div", {
|
|
169
170
|
className: "space-y-2",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ f("div", {
|
|
171
172
|
className: "flex justify-between text-sm",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
173
|
-
|
|
173
|
+
children: [/* @__PURE__ */ f("span", { children: [
|
|
174
|
+
N.completed,
|
|
174
175
|
" of ",
|
|
175
|
-
|
|
176
|
+
N.enrolled,
|
|
176
177
|
" students completed"
|
|
177
|
-
] }), /* @__PURE__ */
|
|
178
|
+
] }), /* @__PURE__ */ f("span", {
|
|
178
179
|
className: "font-medium",
|
|
179
|
-
children: [
|
|
180
|
+
children: [P, "%"]
|
|
180
181
|
})]
|
|
181
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ d("div", {
|
|
182
183
|
className: "h-3 bg-bg-sunken rounded overflow-hidden",
|
|
183
|
-
children: /* @__PURE__ */
|
|
184
|
+
children: /* @__PURE__ */ d("div", {
|
|
184
185
|
className: "h-3 bg-status-success-text rounded",
|
|
185
|
-
style: { width: `${
|
|
186
|
+
style: { width: `${P}%` }
|
|
186
187
|
})
|
|
187
188
|
})]
|
|
188
189
|
}) })] })
|
|
@@ -190,6 +191,6 @@ function w() {
|
|
|
190
191
|
});
|
|
191
192
|
}
|
|
192
193
|
//#endregion
|
|
193
|
-
export {
|
|
194
|
+
export { T as LearningCourseDetailsPagePage };
|
|
194
195
|
|
|
195
196
|
//# sourceMappingURL=LearningCourseDetailsPagePage.js.map
|
|
@@ -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 CardHeader,\n CardTitle,\n EmphasisPanel,\n GradientText,\n IllustratedEmptyState,\n NextSteps,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { BookOpen, Clock, GraduationCap, Play, Star, Users } from 'lucide-react';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { useState } from 'react';\nimport { useGlobalUi } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function LearningCourseDetailsPagePage() {\n const navigate = useNavigate();\n const [searchParams] = useSearchParams();\n const { courses, enrollCourse } = useCrewFoundryStore();\n const { showToast } = useGlobalUi();\n const [enrolling, setEnrolling] = useState(false);\n const courseId = searchParams.get('id');\n const course = courseId ? courses.find((c) => c.id === courseId) : courses[0];\n if (!course)\n return (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-search\"\n title=\"Course not found\"\n description=\"This course is no longer available.\"\n />\n </div>\n );\n const completionRate =\n course.enrolled > 0 ? Math.round((course.completed / course.enrolled) * 100) : 0;\n\n const handleStart = async () => {\n setEnrolling(true);\n try {\n await enrollCourse(course.id);\n showToast('Enrolled — your course is ready', 'success');\n } catch (error) {\n showToast(error instanceof Error ? error.message : 'Unable to enroll in course', '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 <div className=\"flex items-center gap-2 mb-1\">\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>{course.title}</GradientText>\n </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 <PagePurpose className=\"mt-2\">\n Everything you need to decide on and start this course — what it covers, who it's\n for, and how others have done — so you can enroll with confidence and build the right\n skills.\n </PagePurpose>\n </div>\n <Button onClick={handleStart} disabled={enrolling}>\n <Play className=\"h-4 w-4 mr-1\" />\n {enrolling ? 'Enrolling…' : 'Start Course'}\n </Button>\n </div>\n\n <NextSteps\n storageKey=\"crewfoundry-course-details\"\n steps={[\n {\n id: 'start',\n label: 'Start the first module',\n description: 'Begin learning and track your progress as you go.',\n icon: <Play className=\"h-4 w-4\" />,\n onClick: () =>\n navigate(
|
|
1
|
+
{"version":3,"file":"LearningCourseDetailsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningCourseDetailsPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Button,\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n EmphasisPanel,\n GradientText,\n IllustratedEmptyState,\n NextSteps,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { BookOpen, Clock, GraduationCap, Play, Star, Users } from 'lucide-react';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { useState } from 'react';\nimport { useGlobalUi } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\nimport { formatEnumLabel } from '../utils/formatEnumLabel';\n\nexport function LearningCourseDetailsPagePage() {\n const navigate = useNavigate();\n const [searchParams] = useSearchParams();\n const { courses, enrollCourse } = useCrewFoundryStore();\n const { showToast } = useGlobalUi();\n const [enrolling, setEnrolling] = useState(false);\n const courseId = searchParams.get('id');\n const course = courseId ? courses.find((c) => c.id === courseId) : courses[0];\n if (!course)\n return (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-search\"\n title=\"Course not found\"\n description=\"This course is no longer available.\"\n />\n </div>\n );\n const completionRate =\n course.enrolled > 0 ? Math.round((course.completed / course.enrolled) * 100) : 0;\n\n const handleStart = async () => {\n setEnrolling(true);\n try {\n await enrollCourse(course.id);\n showToast('Enrolled — your course is ready', 'success');\n } catch (error) {\n showToast(error instanceof Error ? error.message : 'Unable to enroll in course', '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 <div className=\"flex items-center gap-2 mb-1\">\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>{course.title}</GradientText>\n </h1>\n <Badge\n variant={\n course.level === 'beginner'\n ? 'secondary'\n : course.level === 'intermediate'\n ? 'default'\n : 'destructive'\n }\n >\n {formatEnumLabel(course.level)}\n </Badge>\n </div>\n <p className=\"text-sm text-text-secondary\">\n by {course.instructor} · {course.category}\n </p>\n <PagePurpose className=\"mt-2\">\n Everything you need to decide on and start this course — what it covers, who it's\n for, and how others have done — so you can enroll with confidence and build the right\n skills.\n </PagePurpose>\n </div>\n <Button onClick={handleStart} disabled={enrolling}>\n <Play className=\"h-4 w-4 mr-1\" />\n {enrolling ? 'Enrolling…' : 'Start Course'}\n </Button>\n </div>\n\n <NextSteps\n storageKey=\"crewfoundry-course-details\"\n steps={[\n {\n id: 'start',\n label: 'Start the first module',\n description: 'Begin learning and track your progress as you go.',\n icon: <Play className=\"h-4 w-4\" />,\n onClick: () =>\n navigate(`../learning/course-learning-page?id=${encodeURIComponent(course.id)}`),\n },\n {\n id: 'my-learning',\n label: 'See all your learning',\n description: 'Review everything you are currently enrolled in.',\n icon: <GraduationCap className=\"h-4 w-4\" />,\n onClick: () => navigate('../learning/my-learning-page'),\n },\n {\n id: 'browse',\n label: 'Browse more courses',\n description: 'Find related training to round out your skills.',\n icon: <BookOpen className=\"h-4 w-4\" />,\n onClick: () => navigate('../learning/courses-page'),\n },\n ]}\n />\n\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-status-warning-text 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 <EmphasisPanel>\n <div className=\"mb-2 text-lg font-semibold\">About this Course</div>\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 </EmphasisPanel>\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\n className=\"h-3 bg-status-success-text rounded\"\n style={{ width: `${completionRate}%` }}\n />\n </div>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAoBA,SAAgB,IAAgC;CAC9C,IAAM,IAAW,GAAa,EACxB,CAAC,KAAgB,GAAiB,EAClC,EAAE,YAAS,oBAAiB,GAAqB,EACjD,EAAE,iBAAc,GAAa,EAC7B,CAAC,GAAW,KAAgB,EAAS,GAAM,EAC3C,IAAW,EAAa,IAAI,KAAK,EACjC,IAAS,IAAW,EAAQ,MAAM,MAAM,EAAE,OAAO,EAAS,GAAG,EAAQ;AAC3E,KAAI,CAAC,EACH,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD;GACE,cAAa;GACb,OAAM;GACN,aAAY;GACZ,CAAA;EACE,CAAA;CAEV,IAAM,IACJ,EAAO,WAAW,IAAI,KAAK,MAAO,EAAO,YAAY,EAAO,WAAY,IAAI,GAAG;AAcjF,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD,EAAA,UAAA;KACE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,MAAD;OAAI,WAAU;iBACZ,kBAAC,GAAD,EAAA,UAAe,EAAO,OAAqB,CAAA;OACxC,CAAA,EACL,kBAAC,GAAD;OACE,SACE,EAAO,UAAU,aACb,cACA,EAAO,UAAU,iBACf,YACA;iBAGP,EAAgB,EAAO,MAAM;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K,EAAO;MAAS;MAClC,EAAA,CAAA,EACP,kBAAC,QAAD;MAAM,WAAU;gBAAhB,CAA+B,GAAe,IAAQ;QAClD;QACN,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,OAAD;MACE,WAAU;MACV,OAAO,EAAE,OAAO,GAAG,EAAe,IAAI;MACtC,CAAA;KACE,CAAA,CACF;OACM,CAAA,CACT,EAAA,CAAA;GACH"}
|
|
@@ -1,79 +1,80 @@
|
|
|
1
1
|
import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { formatEnumLabel as t } from "../utils/formatEnumLabel.js";
|
|
3
|
+
import { BookOpen as n, Clock as r, GraduationCap as i, Users as a } from "lucide-react";
|
|
4
|
+
import { useNavigate as o, useSearchParams as s } from "react-router-dom";
|
|
5
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
import { Badge as u, Button as d, Card as f, CardContent as p, GlassCard as m, GradientText as h, IllustratedEmptyState as g, PagePurpose as _ } from "@burdenoff/fe-libs/ui";
|
|
6
7
|
//#region src/crewfoundry/pages/LearningCourseLearningPagePage.tsx
|
|
7
|
-
function
|
|
8
|
-
let
|
|
9
|
-
return
|
|
8
|
+
function v() {
|
|
9
|
+
let v = o(), [y] = s(), { courses: b } = e(), x = y.get("id"), S = x ? b.find((e) => e.id === x) : b[0];
|
|
10
|
+
return S ? /* @__PURE__ */ l("div", {
|
|
10
11
|
className: "max-w-3xl space-y-6 p-6",
|
|
11
12
|
children: [
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
13
|
+
/* @__PURE__ */ l("div", { children: [
|
|
14
|
+
/* @__PURE__ */ l("div", {
|
|
14
15
|
className: "flex items-center gap-2",
|
|
15
|
-
children: [/* @__PURE__ */
|
|
16
|
+
children: [/* @__PURE__ */ c("h1", {
|
|
16
17
|
className: "text-2xl font-semibold",
|
|
17
|
-
children: /* @__PURE__ */
|
|
18
|
-
}), /* @__PURE__ */
|
|
19
|
-
variant:
|
|
20
|
-
children:
|
|
18
|
+
children: /* @__PURE__ */ c(h, { children: S.title })
|
|
19
|
+
}), /* @__PURE__ */ c(u, {
|
|
20
|
+
variant: S.level === "beginner" ? "secondary" : S.level === "intermediate" ? "default" : "destructive",
|
|
21
|
+
children: t(S.level)
|
|
21
22
|
})]
|
|
22
23
|
}),
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ l("p", {
|
|
24
25
|
className: "text-sm text-text-secondary",
|
|
25
26
|
children: [
|
|
26
27
|
"by ",
|
|
27
|
-
|
|
28
|
+
S.instructor,
|
|
28
29
|
" · ",
|
|
29
|
-
|
|
30
|
+
S.category
|
|
30
31
|
]
|
|
31
32
|
}),
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ c(_, {
|
|
33
34
|
className: "mt-1",
|
|
34
35
|
children: "Work through a course lesson-by-lesson — track your progress and complete modules to build the skill at hand."
|
|
35
36
|
})
|
|
36
37
|
] }),
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ l("div", {
|
|
38
39
|
className: "grid gap-4 sm:grid-cols-3",
|
|
39
40
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ c(f, { children: /* @__PURE__ */ l(p, {
|
|
41
42
|
className: "p-4 text-center",
|
|
42
43
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ c(n, { className: "mx-auto mb-1 h-5 w-5 text-text-secondary" }),
|
|
45
|
+
/* @__PURE__ */ c("p", {
|
|
45
46
|
className: "text-lg font-bold",
|
|
46
|
-
children:
|
|
47
|
+
children: S.modules
|
|
47
48
|
}),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ c("p", {
|
|
49
50
|
className: "text-xs text-text-secondary",
|
|
50
51
|
children: "Modules"
|
|
51
52
|
})
|
|
52
53
|
]
|
|
53
54
|
}) }),
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ c(f, { children: /* @__PURE__ */ l(p, {
|
|
55
56
|
className: "p-4 text-center",
|
|
56
57
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ c(r, { className: "mx-auto mb-1 h-5 w-5 text-text-secondary" }),
|
|
59
|
+
/* @__PURE__ */ c("p", {
|
|
59
60
|
className: "text-lg font-bold",
|
|
60
|
-
children:
|
|
61
|
+
children: S.duration
|
|
61
62
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ c("p", {
|
|
63
64
|
className: "text-xs text-text-secondary",
|
|
64
65
|
children: "Duration"
|
|
65
66
|
})
|
|
66
67
|
]
|
|
67
68
|
}) }),
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ c(f, { children: /* @__PURE__ */ l(p, {
|
|
69
70
|
className: "p-4 text-center",
|
|
70
71
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ c(a, { className: "mx-auto mb-1 h-5 w-5 text-text-secondary" }),
|
|
73
|
+
/* @__PURE__ */ c("p", {
|
|
73
74
|
className: "text-lg font-bold",
|
|
74
|
-
children:
|
|
75
|
+
children: S.enrolled
|
|
75
76
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ c("p", {
|
|
77
78
|
className: "text-xs text-text-secondary",
|
|
78
79
|
children: "Enrolled"
|
|
79
80
|
})
|
|
@@ -81,25 +82,25 @@ function _() {
|
|
|
81
82
|
}) })
|
|
82
83
|
]
|
|
83
84
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ c(m, {
|
|
85
86
|
treatment: "glass",
|
|
86
87
|
glow: !0,
|
|
87
88
|
className: "border-border-seam",
|
|
88
|
-
children: /* @__PURE__ */
|
|
89
|
+
children: /* @__PURE__ */ c(p, {
|
|
89
90
|
className: "p-6",
|
|
90
|
-
children: /* @__PURE__ */
|
|
91
|
+
children: /* @__PURE__ */ c(g, {
|
|
91
92
|
illustration: "empty-generic",
|
|
92
93
|
title: "Interactive lessons are coming soon",
|
|
93
94
|
description: "The lesson player and per-module progress tracking are being built. In the meantime you can enroll from the course page and review what this course covers.",
|
|
94
|
-
action: /* @__PURE__ */
|
|
95
|
+
action: /* @__PURE__ */ l("div", {
|
|
95
96
|
className: "flex flex-wrap justify-center gap-2",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
97
|
+
children: [/* @__PURE__ */ l(d, {
|
|
97
98
|
variant: "outline",
|
|
98
|
-
onClick: () =>
|
|
99
|
-
children: [/* @__PURE__ */
|
|
100
|
-
}), /* @__PURE__ */
|
|
99
|
+
onClick: () => v(`../../learning/course-details-page?id=${encodeURIComponent(S.id)}`),
|
|
100
|
+
children: [/* @__PURE__ */ c(i, { className: "mr-1 h-4 w-4" }), "Course details"]
|
|
101
|
+
}), /* @__PURE__ */ c(d, {
|
|
101
102
|
variant: "outline",
|
|
102
|
-
onClick: () =>
|
|
103
|
+
onClick: () => v("../learning/my-learning-page"),
|
|
103
104
|
children: "My learning"
|
|
104
105
|
})]
|
|
105
106
|
})
|
|
@@ -107,21 +108,21 @@ function _() {
|
|
|
107
108
|
})
|
|
108
109
|
})
|
|
109
110
|
]
|
|
110
|
-
}) : /* @__PURE__ */
|
|
111
|
+
}) : /* @__PURE__ */ c("div", {
|
|
111
112
|
className: "p-6",
|
|
112
|
-
children: /* @__PURE__ */
|
|
113
|
+
children: /* @__PURE__ */ c(g, {
|
|
113
114
|
illustration: "empty-search",
|
|
114
115
|
title: "Course not found",
|
|
115
116
|
description: "This course is no longer available.",
|
|
116
|
-
action: /* @__PURE__ */
|
|
117
|
+
action: /* @__PURE__ */ c(d, {
|
|
117
118
|
variant: "outline",
|
|
118
|
-
onClick: () =>
|
|
119
|
+
onClick: () => v("../learning/courses-page"),
|
|
119
120
|
children: "Browse courses"
|
|
120
121
|
})
|
|
121
122
|
})
|
|
122
123
|
});
|
|
123
124
|
}
|
|
124
125
|
//#endregion
|
|
125
|
-
export {
|
|
126
|
+
export { v as LearningCourseLearningPagePage };
|
|
126
127
|
|
|
127
128
|
//# sourceMappingURL=LearningCourseLearningPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LearningCourseLearningPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningCourseLearningPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Button,\n Card,\n CardContent,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { BookOpen, Clock, GraduationCap, Users } from 'lucide-react';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function LearningCourseLearningPagePage() {\n const navigate = useNavigate();\n const [searchParams] = useSearchParams();\n const { courses } = useCrewFoundryStore();\n\n const courseId = searchParams.get('id');\n const course = courseId ? courses.find((c) => c.id === courseId) : courses[0];\n\n if (!course) {\n return (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-search\"\n title=\"Course not found\"\n description=\"This course is no longer available.\"\n action={\n <Button variant=\"outline\" onClick={() => navigate('
|
|
1
|
+
{"version":3,"file":"LearningCourseLearningPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/LearningCourseLearningPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Button,\n Card,\n CardContent,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { BookOpen, Clock, GraduationCap, Users } from 'lucide-react';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\nimport { formatEnumLabel } from '../utils/formatEnumLabel';\n\nexport function LearningCourseLearningPagePage() {\n const navigate = useNavigate();\n const [searchParams] = useSearchParams();\n const { courses } = useCrewFoundryStore();\n\n const courseId = searchParams.get('id');\n const course = courseId ? courses.find((c) => c.id === courseId) : courses[0];\n\n if (!course) {\n return (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-search\"\n title=\"Course not found\"\n description=\"This course is no longer available.\"\n action={\n <Button variant=\"outline\" onClick={() => navigate('../learning/courses-page')}>\n Browse courses\n </Button>\n }\n />\n </div>\n );\n }\n\n return (\n <div className=\"max-w-3xl space-y-6 p-6\">\n <div>\n <div className=\"flex items-center gap-2\">\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>{course.title}</GradientText>\n </h1>\n <Badge\n variant={\n course.level === 'beginner'\n ? 'secondary'\n : course.level === 'intermediate'\n ? 'default'\n : 'destructive'\n }\n >\n {formatEnumLabel(course.level)}\n </Badge>\n </div>\n <p className=\"text-sm text-text-secondary\">\n by {course.instructor} · {course.category}\n </p>\n <PagePurpose className=\"mt-1\">\n Work through a course lesson-by-lesson — track your progress and complete modules to build\n the skill at hand.\n </PagePurpose>\n </div>\n\n <div className=\"grid gap-4 sm:grid-cols-3\">\n <Card>\n <CardContent className=\"p-4 text-center\">\n <BookOpen className=\"mx-auto mb-1 h-5 w-5 text-text-secondary\" />\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 <Clock className=\"mx-auto mb-1 h-5 w-5 text-text-secondary\" />\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 <Users className=\"mx-auto mb-1 h-5 w-5 text-text-secondary\" />\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 </div>\n\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam\">\n <CardContent className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"Interactive lessons are coming soon\"\n description=\"The lesson player and per-module progress tracking are being built. In the meantime you can enroll from the course page and review what this course covers.\"\n action={\n <div className=\"flex flex-wrap justify-center gap-2\">\n <Button\n variant=\"outline\"\n onClick={() =>\n navigate(\n `../../learning/course-details-page?id=${encodeURIComponent(course.id)}`\n )\n }\n >\n <GraduationCap className=\"mr-1 h-4 w-4\" />\n Course details\n </Button>\n <Button\n variant=\"outline\"\n onClick={() => navigate('../learning/my-learning-page')}\n >\n My learning\n </Button>\n </div>\n }\n />\n </CardContent>\n </GlassCard>\n </div>\n );\n}\n"],"mappings":";;;;;;;AAeA,SAAgB,IAAiC;CAC/C,IAAM,IAAW,GAAa,EACxB,CAAC,KAAgB,GAAiB,EAClC,EAAE,eAAY,GAAqB,EAEnC,IAAW,EAAa,IAAI,KAAK,EACjC,IAAS,IAAW,EAAQ,MAAM,MAAM,EAAE,OAAO,EAAS,GAAG,EAAQ;AAmB3E,QAjBK,IAkBH,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD,EAAA,UAAA;IACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,MAAD;MAAI,WAAU;gBACZ,kBAAC,GAAD,EAAA,UAAe,EAAO,OAAqB,CAAA;MACxC,CAAA,EACL,kBAAC,GAAD;MACE,SACE,EAAO,UAAU,aACb,cACA,EAAO,UAAU,iBACf,YACA;gBAGP,EAAgB,EAAO,MAAM;MACxB,CAAA,CACJ;;IACN,kBAAC,KAAD;KAAG,WAAU;eAAb;MAA2C;MACrC,EAAO;MAAW;MAAI,EAAO;MAC/B;;IACJ,kBAAC,GAAD;KAAa,WAAU;eAAO;KAGhB,CAAA;IACV,EAAA,CAAA;GAEN,kBAAC,OAAD;IAAK,WAAU;cAAf;K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