@burdenoff/microfe-crewfoundry 2026.1013.2 → 2026.1029.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/CrewFoundryRoot.d.ts.map +1 -1
- package/dist/crewfoundry/CrewFoundryRoot.js +160 -256
- package/dist/crewfoundry/CrewFoundryRoot.js.map +1 -1
- package/dist/crewfoundry/CrewFoundryRoutes.d.ts.map +1 -1
- package/dist/crewfoundry/CrewFoundryRoutes.js +152 -192
- package/dist/crewfoundry/CrewFoundryRoutes.js.map +1 -1
- package/dist/crewfoundry/components/InlineError.d.ts +5 -0
- package/dist/crewfoundry/components/InlineError.d.ts.map +1 -0
- package/dist/crewfoundry/components/InlineError.js +17 -0
- package/dist/crewfoundry/components/InlineError.js.map +1 -0
- package/dist/crewfoundry/components/marketplace/BookServiceModal.d.ts +14 -0
- package/dist/crewfoundry/components/marketplace/BookServiceModal.d.ts.map +1 -0
- package/dist/crewfoundry/components/marketplace/BookServiceModal.js +75 -0
- package/dist/crewfoundry/components/marketplace/BookServiceModal.js.map +1 -0
- package/dist/crewfoundry/components/marketplace/MarketplaceTabs.d.ts +24 -0
- package/dist/crewfoundry/components/marketplace/MarketplaceTabs.d.ts.map +1 -0
- package/dist/crewfoundry/components/marketplace/MarketplaceTabs.js +47 -0
- package/dist/crewfoundry/components/marketplace/MarketplaceTabs.js.map +1 -0
- package/dist/crewfoundry/components/marketplace/ServiceListingModal.d.ts +12 -0
- package/dist/crewfoundry/components/marketplace/ServiceListingModal.d.ts.map +1 -0
- package/dist/crewfoundry/components/marketplace/ServiceListingModal.js +123 -0
- package/dist/crewfoundry/components/marketplace/ServiceListingModal.js.map +1 -0
- package/dist/crewfoundry/components/viz/CertificateCard.js +4 -118
- package/dist/crewfoundry/components/viz/PathSteps.js +3 -68
- package/dist/crewfoundry/components/viz/lib/geometry.js +5 -13
- package/dist/crewfoundry/components/viz/lib/geometry.js.map +1 -1
- package/dist/crewfoundry/lib/analytics.d.ts +1 -6
- package/dist/crewfoundry/lib/analytics.d.ts.map +1 -1
- package/dist/crewfoundry/lib/analytics.js +3 -18
- package/dist/crewfoundry/lib/analytics.js.map +1 -1
- package/dist/crewfoundry/lib/companyFinance.d.ts +3 -7
- package/dist/crewfoundry/lib/companyFinance.d.ts.map +1 -1
- package/dist/crewfoundry/lib/companyFinance.js +3 -8
- package/dist/crewfoundry/lib/companyFinance.js.map +1 -1
- package/dist/crewfoundry/lib/learning.d.ts +12 -0
- package/dist/crewfoundry/lib/learning.d.ts.map +1 -0
- package/dist/crewfoundry/lib/learning.js +26 -0
- package/dist/crewfoundry/lib/learning.js.map +1 -0
- package/dist/crewfoundry/lib/marketplace.d.ts +30 -0
- package/dist/crewfoundry/lib/marketplace.d.ts.map +1 -0
- package/dist/crewfoundry/lib/marketplace.js +91 -0
- package/dist/crewfoundry/lib/marketplace.js.map +1 -0
- package/dist/crewfoundry/lib/useEnsureLoaded.d.ts +7 -0
- package/dist/crewfoundry/lib/useEnsureLoaded.d.ts.map +1 -0
- package/dist/crewfoundry/lib/useEnsureLoaded.js +25 -0
- package/dist/crewfoundry/lib/useEnsureLoaded.js.map +1 -0
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js +12 -25
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +145 -157
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +14 -14
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +14 -14
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js +71 -33
- package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js +247 -173
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCoursesPagePage.d.ts +12 -0
- package/dist/crewfoundry/pages/LearningCoursesPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js +307 -293
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningEnrollmentsPagePage.d.ts +2 -0
- package/dist/crewfoundry/pages/LearningEnrollmentsPagePage.d.ts.map +1 -0
- package/dist/crewfoundry/pages/LearningEnrollmentsPagePage.js +223 -0
- package/dist/crewfoundry/pages/LearningEnrollmentsPagePage.js.map +1 -0
- package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.d.ts +4 -0
- package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.js +115 -160
- package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js +165 -75
- package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceEscrowPagePage.d.ts +7 -0
- package/dist/crewfoundry/pages/MarketplaceEscrowPagePage.d.ts.map +1 -0
- package/dist/crewfoundry/pages/MarketplaceEscrowPagePage.js +175 -0
- package/dist/crewfoundry/pages/MarketplaceEscrowPagePage.js.map +1 -0
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js +182 -223
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js +168 -227
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js +127 -290
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.d.ts +138 -78
- package/dist/crewfoundry/store/crewfoundryStore.d.ts.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.js +323 -244
- package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
- package/dist/crewfoundry/utils/dateUtils.d.ts +5 -0
- package/dist/crewfoundry/utils/dateUtils.d.ts.map +1 -1
- package/dist/crewfoundry/utils/dateUtils.js +10 -1
- package/dist/crewfoundry/utils/dateUtils.js.map +1 -1
- package/dist/generated/global-types.d.ts +5145 -1627
- package/dist/generated/global-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.d.ts +100373 -34602
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/utils/pageContext.d.ts.map +1 -1
- package/dist/utils/pageContext.js +0 -1
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +1 -1
- package/dist/crewfoundry/components/viz/CertificateCard.js.map +0 -1
- package/dist/crewfoundry/components/viz/PathSteps.js.map +0 -1
- package/dist/crewfoundry/pages/CommunicationsCallsPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/CommunicationsCallsPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js +0 -53
- package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js +0 -107
- package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js +0 -62
- package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js +0 -37
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.js +0 -111
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js +0 -309
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/LearningLearningPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/LearningLearningPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/LearningLearningPagePage.js +0 -200
- package/dist/crewfoundry/pages/LearningLearningPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +0 -190
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js +0 -230
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/LearningMyLearningPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/LearningMyLearningPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/LearningMyLearningPagePage.js +0 -293
- package/dist/crewfoundry/pages/LearningMyLearningPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js +0 -163
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.d.ts +0 -2
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js +0 -365
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js.map +0 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js +0 -224
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js.map +0 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js +0 -180
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.js +0 -38
- package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js +0 -204
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/PaymentsEscrowPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/PaymentsEscrowPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/PaymentsEscrowPagePage.js +0 -55
- package/dist/crewfoundry/pages/PaymentsEscrowPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js +0 -335
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js +0 -160
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js +0 -80
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js.map +0 -1
- package/dist/crewfoundry/pages/PaymentsSecurityPagePage.d.ts +0 -2
- package/dist/crewfoundry/pages/PaymentsSecurityPagePage.d.ts.map +0 -1
- package/dist/crewfoundry/pages/PaymentsSecurityPagePage.js +0 -191
- package/dist/crewfoundry/pages/PaymentsSecurityPagePage.js.map +0 -1
- package/dist/crewfoundry/utils/courseProgress.d.ts +0 -33
- package/dist/crewfoundry/utils/courseProgress.d.ts.map +0 -1
- package/dist/crewfoundry/utils/courseProgress.js +0 -46
- package/dist/crewfoundry/utils/courseProgress.js.map +0 -1
|
@@ -1,359 +1,373 @@
|
|
|
1
1
|
import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { RatingStars as r } from "../components/viz/RatingStars.js";
|
|
2
|
+
import { StatCard as t } from "../components/viz/StatCard.js";
|
|
3
|
+
import { SegmentedTabs as n } from "../components/viz/SegmentedTabs.js";
|
|
5
4
|
import "../components/viz/index.js";
|
|
6
|
-
import { FormModal as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
5
|
+
import { FormModal as ee, useFormModal as te } from "../components/forms/FormModal.js";
|
|
6
|
+
import { InlineError as ne } from "../components/InlineError.js";
|
|
7
|
+
import { formatDuration as re, isSafeContentUrl as r } from "../lib/learning.js";
|
|
8
|
+
import { useEnsureLoaded as ie } from "../lib/useEnsureLoaded.js";
|
|
9
|
+
import { useMemo as i, useState as a } from "react";
|
|
10
|
+
import { Archive as ae, ArchiveRestore as oe, Clock as se, ExternalLink as ce, MoreHorizontal as le, Pencil as ue, Plus as o, Search as de, Trash2 as fe, Users as pe } from "lucide-react";
|
|
11
|
+
import { useNavigate as me } from "react-router";
|
|
12
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
13
|
+
import { AlertDialog as l, AlertDialogAction as he, AlertDialogCancel as ge, AlertDialogContent as _e, AlertDialogDescription as ve, AlertDialogFooter as ye, AlertDialogHeader as be, AlertDialogTitle as xe, Badge as u, Button as d, CardContent as Se, CardHeader as Ce, CardTitle as we, DropdownMenu as Te, DropdownMenuContent as Ee, DropdownMenuItem as f, DropdownMenuSeparator as De, DropdownMenuTrigger as p, GlassCard as m, GradientText as h, IllustratedEmptyState as g, Input as _, PagePurpose as v, Pagination as y, Select as b, SelectContent as x, SelectItem as S, SelectTrigger as C, SelectValue as w, Spinner as T } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
import { usePagination as E } from "@burdenoff/fe-libs/shared/hooks";
|
|
15
15
|
//#region src/crewfoundry/pages/LearningCoursesPagePage.tsx
|
|
16
|
-
var
|
|
16
|
+
var D = [
|
|
17
17
|
{
|
|
18
18
|
name: "title",
|
|
19
|
-
label: "Course
|
|
19
|
+
label: "Course title",
|
|
20
20
|
type: "text",
|
|
21
21
|
required: !0,
|
|
22
22
|
colSpan: 2
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
name: "
|
|
26
|
-
label: "
|
|
27
|
-
type: "
|
|
28
|
-
required: !0
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: "instructor",
|
|
32
|
-
label: "Instructor",
|
|
33
|
-
type: "text",
|
|
25
|
+
name: "description",
|
|
26
|
+
label: "Description",
|
|
27
|
+
type: "textarea",
|
|
34
28
|
required: !0
|
|
35
29
|
},
|
|
36
30
|
{
|
|
37
|
-
name: "
|
|
38
|
-
label: "
|
|
31
|
+
name: "contentUrl",
|
|
32
|
+
label: "Content link",
|
|
39
33
|
type: "text",
|
|
40
34
|
required: !0,
|
|
41
|
-
|
|
35
|
+
colSpan: 2,
|
|
36
|
+
placeholder: "https://… (internal doc, LMS or video)"
|
|
42
37
|
},
|
|
43
38
|
{
|
|
44
|
-
name: "
|
|
45
|
-
label: "
|
|
39
|
+
name: "durationMinutes",
|
|
40
|
+
label: "Duration (minutes)",
|
|
46
41
|
type: "number",
|
|
47
|
-
|
|
48
|
-
placeholder: "e.g.
|
|
42
|
+
min: 0,
|
|
43
|
+
placeholder: "e.g. 45"
|
|
49
44
|
},
|
|
50
45
|
{
|
|
51
|
-
name: "
|
|
52
|
-
label: "
|
|
53
|
-
type: "
|
|
54
|
-
required: !0,
|
|
55
|
-
options: [
|
|
56
|
-
{
|
|
57
|
-
label: "Beginner",
|
|
58
|
-
value: "beginner"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
label: "Intermediate",
|
|
62
|
-
value: "intermediate"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
label: "Advanced",
|
|
66
|
-
value: "advanced"
|
|
67
|
-
}
|
|
68
|
-
]
|
|
46
|
+
name: "isActive",
|
|
47
|
+
label: "Active (open for enrollment)",
|
|
48
|
+
type: "switch"
|
|
69
49
|
},
|
|
70
50
|
{
|
|
71
|
-
name: "
|
|
72
|
-
label: "
|
|
73
|
-
type: "
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
51
|
+
name: "requiredForRoles",
|
|
52
|
+
label: "Required for roles",
|
|
53
|
+
type: "tags",
|
|
54
|
+
placeholder: "Type a role and press Enter"
|
|
55
|
+
}
|
|
56
|
+
], O = (e) => ({
|
|
57
|
+
title: e.title,
|
|
58
|
+
description: e.description,
|
|
59
|
+
contentUrl: e.contentUrl,
|
|
60
|
+
durationMinutes: e.durationMinutes ?? "",
|
|
61
|
+
isActive: e.isActive,
|
|
62
|
+
requiredForRoles: e.requiredForRoles
|
|
63
|
+
}), k = (e) => {
|
|
64
|
+
let t = String(e.contentUrl ?? "").trim();
|
|
65
|
+
if (!r(t)) throw Error("Content link must be a full http(s) URL, e.g. https://example.com/course");
|
|
66
|
+
let n = Number(e.durationMinutes);
|
|
67
|
+
return {
|
|
68
|
+
title: String(e.title ?? "").trim(),
|
|
69
|
+
description: String(e.description ?? "").trim(),
|
|
70
|
+
contentUrl: t,
|
|
71
|
+
durationMinutes: e.durationMinutes === "" || !Number.isFinite(n) ? null : Math.round(n),
|
|
72
|
+
isActive: !!e.isActive,
|
|
73
|
+
requiredForRoles: Array.isArray(e.requiredForRoles) ? e.requiredForRoles : []
|
|
74
|
+
};
|
|
75
|
+
}, A = [
|
|
76
|
+
{
|
|
77
|
+
id: "courses",
|
|
78
|
+
label: "Courses",
|
|
79
|
+
path: "../learning/courses-page"
|
|
89
80
|
},
|
|
90
81
|
{
|
|
91
|
-
|
|
92
|
-
label: "
|
|
93
|
-
|
|
94
|
-
required: !0,
|
|
95
|
-
colSpan: 2
|
|
82
|
+
id: "enrollments",
|
|
83
|
+
label: "Enrollments",
|
|
84
|
+
path: "../learning/enrollments-page"
|
|
96
85
|
},
|
|
97
86
|
{
|
|
98
|
-
|
|
99
|
-
label: "
|
|
100
|
-
|
|
101
|
-
placeholder: "Add a skill and press Enter",
|
|
102
|
-
colSpan: 2
|
|
87
|
+
id: "completion",
|
|
88
|
+
label: "Completion",
|
|
89
|
+
path: "../learning/learning-analytics-page"
|
|
103
90
|
}
|
|
104
91
|
];
|
|
105
|
-
function
|
|
106
|
-
let
|
|
107
|
-
|
|
108
|
-
return t[r % t.length];
|
|
109
|
-
}
|
|
110
|
-
function L(e) {
|
|
111
|
-
let t = e.toLowerCase();
|
|
112
|
-
return t.includes("engineer") || t.includes("develop") || t.includes("program") || t.includes("tech") ? d : t.includes("design") || t.includes("ux") || t.includes("ui") ? m : t.includes("lead") || t.includes("manage") || t.includes("people") || t.includes("hr") ? y : t.includes("compliance") || t.includes("security") || t.includes("legal") ? v : t.includes("data") || t.includes("analyt") ? l : t.includes("market") || t.includes("sales") ? p : t.includes("business") || t.includes("finance") || t.includes("operations") ? u : f;
|
|
113
|
-
}
|
|
114
|
-
function R(e) {
|
|
115
|
-
return e === "beginner" ? "secondary" : e === "intermediate" ? "default" : "destructive";
|
|
116
|
-
}
|
|
117
|
-
function z() {
|
|
118
|
-
let { courses: n, addCourse: l, enrollCourse: u } = e(), { showToast: d } = P(), f = b(), [p, m] = c(""), [v, z] = c("all"), [B, V] = c(null), H = a(), { page: U, pageSize: W, offset: G, setPage: K } = N({ initialPageSize: 12 }), q = s(() => {
|
|
119
|
-
let e = /* @__PURE__ */ new Map();
|
|
120
|
-
for (let t of n) {
|
|
121
|
-
let n = t.category.trim() || "Uncategorized";
|
|
122
|
-
e.set(n, (e.get(n) ?? 0) + 1);
|
|
123
|
-
}
|
|
124
|
-
return [...e.entries()].sort((e, t) => t[1] - e[1]);
|
|
125
|
-
}, [n]), J = n.filter((e) => {
|
|
126
|
-
let t = v === "all" || (e.category.trim() || "Uncategorized") === v, n = `${e.title} ${e.category} ${e.instructor} ${e.skills.join(" ")}`.toLowerCase().includes(p.toLowerCase());
|
|
92
|
+
function j() {
|
|
93
|
+
let { trainingCourses: r, enrollments: j, trainingCompletion: M, learningLoaded: N, fetchLearning: Oe, createTrainingCourse: P, updateTrainingCourse: F, removeTrainingCourse: ke } = e(), I = ie(N, Oe), L = me(), R = te(), [Ae, z] = a(), [je, B] = a(null), [V, Me] = a(""), [H, Ne] = a("active"), [U, W] = a(null), { page: Pe, pageSize: G, offset: K, setPage: q } = E({ initialPageSize: 12 }), Fe = i(() => new Map(M.map((e) => [e.courseId, e])), [M]), J = V.trim().toLowerCase(), Y = r.filter((e) => {
|
|
94
|
+
let t = J === "" || `${e.title} ${e.description} ${e.requiredForRoles.join(" ")}`.toLowerCase().includes(J), n = H === "all" || (H === "active" ? e.isActive : !e.isActive);
|
|
127
95
|
return t && n;
|
|
128
|
-
}),
|
|
129
|
-
|
|
96
|
+
}), Ie = Y.slice(K, K + G), X = r.filter((e) => e.isActive).length, Z = j.filter((e) => e.status === "completed").length, Le = j.length === 0 ? 0 : Math.round(Z / j.length * 100), Re = async (e) => {
|
|
97
|
+
z(void 0);
|
|
130
98
|
try {
|
|
131
|
-
|
|
99
|
+
let t = k(e);
|
|
100
|
+
R.context ? await F(R.context.id, t) : await P(t);
|
|
132
101
|
} catch (e) {
|
|
133
|
-
|
|
134
|
-
} finally {
|
|
135
|
-
V(null);
|
|
102
|
+
throw z(e instanceof Error ? e.message : "Unable to save course"), e;
|
|
136
103
|
}
|
|
137
|
-
}
|
|
138
|
-
|
|
104
|
+
}, Q = async (e) => {
|
|
105
|
+
B(null);
|
|
106
|
+
try {
|
|
107
|
+
await e();
|
|
108
|
+
} catch (e) {
|
|
109
|
+
B(e instanceof Error ? e.message : "Something went wrong");
|
|
110
|
+
}
|
|
111
|
+
}, $ = (e) => L(`../learning/course-details-page?id=${encodeURIComponent(e.id)}`);
|
|
112
|
+
return /* @__PURE__ */ c("div", {
|
|
139
113
|
className: "space-y-6 p-6",
|
|
140
114
|
children: [
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
className: "flex flex-
|
|
143
|
-
children: [/* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ c("div", {
|
|
116
|
+
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
117
|
+
children: [/* @__PURE__ */ c("div", { children: [
|
|
118
|
+
/* @__PURE__ */ s("h1", {
|
|
145
119
|
className: "text-2xl font-semibold",
|
|
146
|
-
children: /* @__PURE__ */
|
|
120
|
+
children: /* @__PURE__ */ s(h, { children: "Training Courses" })
|
|
147
121
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ c("p", {
|
|
149
123
|
className: "text-sm text-text-secondary",
|
|
150
124
|
children: [
|
|
151
|
-
|
|
125
|
+
r.length,
|
|
152
126
|
" courses · ",
|
|
153
|
-
|
|
154
|
-
"
|
|
127
|
+
X,
|
|
128
|
+
" open for enrollment"
|
|
155
129
|
]
|
|
156
130
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ s(v, {
|
|
158
132
|
className: "mt-1",
|
|
159
|
-
children: "
|
|
133
|
+
children: "Curate the training your people need — link each course to where its content lives, mark which roles must take it, then enroll employees and track their completion."
|
|
160
134
|
})
|
|
161
|
-
] }), /* @__PURE__ */
|
|
162
|
-
|
|
163
|
-
|
|
135
|
+
] }), /* @__PURE__ */ c(d, {
|
|
136
|
+
size: "sm",
|
|
137
|
+
onClick: () => {
|
|
138
|
+
z(void 0), R.openModal();
|
|
139
|
+
},
|
|
140
|
+
children: [/* @__PURE__ */ s(o, { className: "mr-1 h-4 w-4" }), "Create Course"]
|
|
164
141
|
})]
|
|
165
142
|
}),
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
143
|
+
/* @__PURE__ */ s(n, {
|
|
144
|
+
"aria-label": "Learning sections",
|
|
145
|
+
variant: "underline",
|
|
146
|
+
value: "courses",
|
|
147
|
+
onChange: (e) => {
|
|
148
|
+
let t = A.find((t) => t.id === e);
|
|
149
|
+
t && e !== "courses" && L(t.path);
|
|
150
|
+
},
|
|
151
|
+
tabs: A.map(({ id: e, label: t }) => ({
|
|
152
|
+
id: e,
|
|
153
|
+
label: t
|
|
154
|
+
}))
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ s(ne, { message: I ?? je }),
|
|
157
|
+
/* @__PURE__ */ c("div", {
|
|
158
|
+
className: "grid gap-4 sm:grid-cols-2 xl:grid-cols-4",
|
|
159
|
+
children: [
|
|
160
|
+
/* @__PURE__ */ s(t, {
|
|
161
|
+
label: "Active Courses",
|
|
162
|
+
value: X
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ s(t, {
|
|
165
|
+
label: "Enrollments",
|
|
166
|
+
value: j.length
|
|
167
|
+
}),
|
|
168
|
+
/* @__PURE__ */ s(t, {
|
|
169
|
+
label: "Completed",
|
|
170
|
+
value: Z
|
|
171
|
+
}),
|
|
172
|
+
/* @__PURE__ */ s(t, {
|
|
173
|
+
label: "Completion Rate",
|
|
174
|
+
value: `${Le}%`
|
|
175
|
+
})
|
|
176
|
+
]
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ c("div", {
|
|
179
|
+
className: "flex flex-col gap-2 sm:flex-row sm:items-center",
|
|
180
|
+
children: [/* @__PURE__ */ c("div", {
|
|
181
|
+
className: "relative flex-1",
|
|
182
|
+
children: [/* @__PURE__ */ s(de, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ s(_, {
|
|
183
|
+
placeholder: "Search courses or roles...",
|
|
172
184
|
className: "pl-9",
|
|
173
|
-
value:
|
|
185
|
+
value: V,
|
|
174
186
|
onChange: (e) => {
|
|
175
|
-
|
|
187
|
+
Me(e.target.value), q(1);
|
|
176
188
|
}
|
|
177
189
|
})]
|
|
178
|
-
}), /* @__PURE__ */
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
children:
|
|
187
|
-
}),
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
190
|
+
}), /* @__PURE__ */ c(b, {
|
|
191
|
+
value: H,
|
|
192
|
+
onValueChange: (e) => {
|
|
193
|
+
Ne(e), q(1);
|
|
194
|
+
},
|
|
195
|
+
children: [/* @__PURE__ */ s(C, {
|
|
196
|
+
className: "w-full sm:w-44",
|
|
197
|
+
"aria-label": "Filter by status",
|
|
198
|
+
children: /* @__PURE__ */ s(w, {})
|
|
199
|
+
}), /* @__PURE__ */ c(x, { children: [
|
|
200
|
+
/* @__PURE__ */ s(S, {
|
|
201
|
+
value: "active",
|
|
202
|
+
children: "Active"
|
|
203
|
+
}),
|
|
204
|
+
/* @__PURE__ */ s(S, {
|
|
205
|
+
value: "inactive",
|
|
206
|
+
children: "Archived"
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ s(S, {
|
|
209
|
+
value: "all",
|
|
210
|
+
children: "All courses"
|
|
211
|
+
})
|
|
212
|
+
] })]
|
|
198
213
|
})]
|
|
199
214
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
215
|
+
!N && !I ? /* @__PURE__ */ s("div", {
|
|
216
|
+
className: "flex min-h-[240px] items-center justify-center",
|
|
217
|
+
children: /* @__PURE__ */ s(T, { size: "lg" })
|
|
218
|
+
}) : r.length === 0 ? /* @__PURE__ */ s(g, {
|
|
219
|
+
illustration: "empty-data",
|
|
220
|
+
title: "No courses yet",
|
|
221
|
+
description: "Create a course and link it to its content to start enrolling employees.",
|
|
222
|
+
action: /* @__PURE__ */ c(d, {
|
|
223
|
+
size: "sm",
|
|
224
|
+
onClick: () => R.openModal(),
|
|
225
|
+
children: [/* @__PURE__ */ s(o, { className: "mr-1 h-4 w-4" }), "Create Course"]
|
|
226
|
+
})
|
|
227
|
+
}) : Y.length === 0 ? /* @__PURE__ */ s(g, {
|
|
228
|
+
illustration: "empty-search",
|
|
229
|
+
title: "No courses match",
|
|
230
|
+
description: "Try a different search term or status filter."
|
|
231
|
+
}) : /* @__PURE__ */ s("div", {
|
|
201
232
|
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
202
|
-
children:
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
let n = I(e.category), i = L(e.category), a = o(e.id), s = Math.max(e.modules, 1), c = a.completed.length > 0 ? Math.min(100, Math.round(a.completed.length / s * 100)) : 0, l = c > 0;
|
|
211
|
-
return /* @__PURE__ */ S(D, {
|
|
212
|
-
treatment: "plain",
|
|
213
|
-
className: "group flex flex-col overflow-hidden transition-shadow hover:shadow-md",
|
|
214
|
-
children: [
|
|
215
|
-
/* @__PURE__ */ S("button", {
|
|
233
|
+
children: Ie.map((e) => {
|
|
234
|
+
let t = Fe.get(e.id);
|
|
235
|
+
return /* @__PURE__ */ c(m, {
|
|
236
|
+
treatment: "glass",
|
|
237
|
+
className: "flex flex-col",
|
|
238
|
+
children: [/* @__PURE__ */ s(Ce, { children: /* @__PURE__ */ c("div", {
|
|
239
|
+
className: "flex items-start justify-between gap-2",
|
|
240
|
+
children: [/* @__PURE__ */ s("button", {
|
|
216
241
|
type: "button",
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
variant:
|
|
242
|
+
onClick: () => $(e),
|
|
243
|
+
className: "min-w-0 text-left",
|
|
244
|
+
children: /* @__PURE__ */ s(we, {
|
|
245
|
+
className: "line-clamp-2 text-base hover:underline",
|
|
246
|
+
children: e.title
|
|
247
|
+
})
|
|
248
|
+
}), /* @__PURE__ */ c("div", {
|
|
249
|
+
className: "flex items-center gap-1",
|
|
250
|
+
children: [/* @__PURE__ */ s(u, {
|
|
251
|
+
variant: e.isActive ? "default" : "secondary",
|
|
227
252
|
className: "text-[10px]",
|
|
228
|
-
children:
|
|
229
|
-
})
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
className: "
|
|
237
|
-
children: e.category
|
|
238
|
-
}),
|
|
239
|
-
/* @__PURE__ */ x("button", {
|
|
240
|
-
type: "button",
|
|
241
|
-
onClick: () => X(e.id),
|
|
242
|
-
className: "mt-2 text-left text-base font-semibold outline-none hover:text-action-primary-bg focus-visible:text-action-primary-bg",
|
|
243
|
-
children: e.title
|
|
244
|
-
}),
|
|
245
|
-
/* @__PURE__ */ S("p", {
|
|
246
|
-
className: "text-xs text-text-secondary",
|
|
247
|
-
children: [
|
|
248
|
-
e.instructor,
|
|
249
|
-
" · ",
|
|
250
|
-
e.duration,
|
|
251
|
-
" · ",
|
|
252
|
-
e.modules,
|
|
253
|
-
" modules"
|
|
254
|
-
]
|
|
253
|
+
children: e.isActive ? "Active" : "Archived"
|
|
254
|
+
}), /* @__PURE__ */ c(Te, { children: [/* @__PURE__ */ s(p, {
|
|
255
|
+
asChild: !0,
|
|
256
|
+
children: /* @__PURE__ */ s(d, {
|
|
257
|
+
variant: "ghost",
|
|
258
|
+
size: "icon",
|
|
259
|
+
className: "h-8 w-8",
|
|
260
|
+
"aria-label": `More actions for ${e.title}`,
|
|
261
|
+
children: /* @__PURE__ */ s(le, { className: "h-4 w-4" })
|
|
255
262
|
})
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
263
|
+
}), /* @__PURE__ */ c(Ee, {
|
|
264
|
+
align: "end",
|
|
265
|
+
children: [
|
|
266
|
+
/* @__PURE__ */ c(f, {
|
|
267
|
+
onSelect: () => {
|
|
268
|
+
z(void 0), R.openModal(e);
|
|
269
|
+
},
|
|
270
|
+
children: [/* @__PURE__ */ s(ue, { className: "mr-2 h-4 w-4" }), "Edit"]
|
|
271
|
+
}),
|
|
272
|
+
/* @__PURE__ */ c(f, {
|
|
273
|
+
onSelect: () => void Q(() => F(e.id, { isActive: !e.isActive })),
|
|
274
|
+
children: [e.isActive ? /* @__PURE__ */ s(ae, { className: "mr-2 h-4 w-4" }) : /* @__PURE__ */ s(oe, { className: "mr-2 h-4 w-4" }), e.isActive ? "Archive" : "Reactivate"]
|
|
275
|
+
}),
|
|
276
|
+
/* @__PURE__ */ s(De, {}),
|
|
277
|
+
/* @__PURE__ */ c(f, {
|
|
278
|
+
className: "text-status-error-text",
|
|
279
|
+
onSelect: () => W(e),
|
|
280
|
+
children: [/* @__PURE__ */ s(fe, { className: "mr-2 h-4 w-4" }), "Delete"]
|
|
281
|
+
})
|
|
282
|
+
]
|
|
283
|
+
})] })]
|
|
284
|
+
})]
|
|
285
|
+
}) }), /* @__PURE__ */ c(Se, {
|
|
286
|
+
className: "flex flex-1 flex-col gap-3",
|
|
287
|
+
children: [
|
|
288
|
+
/* @__PURE__ */ s("p", {
|
|
289
|
+
className: "line-clamp-3 text-sm text-text-secondary",
|
|
290
|
+
children: e.description
|
|
291
|
+
}),
|
|
292
|
+
e.requiredForRoles.length > 0 && /* @__PURE__ */ s("div", {
|
|
293
|
+
className: "flex flex-wrap gap-1",
|
|
294
|
+
children: e.requiredForRoles.map((e) => /* @__PURE__ */ s(u, {
|
|
295
|
+
variant: "outline",
|
|
296
|
+
className: "text-[10px]",
|
|
297
|
+
children: e
|
|
298
|
+
}, e))
|
|
299
|
+
}),
|
|
300
|
+
/* @__PURE__ */ c("div", {
|
|
301
|
+
className: "mt-auto flex items-center justify-between border-t border-border-default pt-3 text-xs text-text-secondary",
|
|
302
|
+
children: [/* @__PURE__ */ c("span", {
|
|
303
|
+
className: "flex items-center gap-1",
|
|
304
|
+
children: [/* @__PURE__ */ s(se, { className: "h-3.5 w-3.5" }), re(e.durationMinutes)]
|
|
305
|
+
}), /* @__PURE__ */ c("span", {
|
|
306
|
+
className: "flex items-center gap-1",
|
|
307
|
+
children: [/* @__PURE__ */ s(pe, { className: "h-3.5 w-3.5" }), t ? `${t.completedCount}/${t.totalEnrolled} completed` : "No enrollments"]
|
|
308
|
+
})]
|
|
309
|
+
}),
|
|
310
|
+
/* @__PURE__ */ c("div", {
|
|
311
|
+
className: "flex gap-2",
|
|
312
|
+
children: [/* @__PURE__ */ s(d, {
|
|
313
|
+
size: "sm",
|
|
314
|
+
variant: "outline",
|
|
315
|
+
className: "flex-1",
|
|
316
|
+
onClick: () => $(e),
|
|
317
|
+
children: "Manage"
|
|
318
|
+
}), /* @__PURE__ */ s(d, {
|
|
319
|
+
size: "sm",
|
|
320
|
+
variant: "ghost",
|
|
321
|
+
asChild: !0,
|
|
322
|
+
children: /* @__PURE__ */ c("a", {
|
|
323
|
+
href: e.contentUrl,
|
|
324
|
+
target: "_blank",
|
|
325
|
+
rel: "noopener noreferrer",
|
|
326
|
+
children: [/* @__PURE__ */ s(ce, { className: "mr-1 h-3.5 w-3.5" }), "Open"]
|
|
327
|
+
})
|
|
328
|
+
})]
|
|
329
|
+
})
|
|
330
|
+
]
|
|
331
|
+
})]
|
|
319
332
|
}, e.id);
|
|
320
333
|
})
|
|
321
334
|
}),
|
|
322
|
-
|
|
323
|
-
page:
|
|
324
|
-
pageSize:
|
|
325
|
-
totalItems:
|
|
326
|
-
onPageChange:
|
|
335
|
+
Y.length > G && /* @__PURE__ */ s(y, {
|
|
336
|
+
page: Pe,
|
|
337
|
+
pageSize: G,
|
|
338
|
+
totalItems: Y.length,
|
|
339
|
+
onPageChange: q
|
|
340
|
+
}),
|
|
341
|
+
/* @__PURE__ */ s(ee, {
|
|
342
|
+
open: R.open,
|
|
343
|
+
onOpenChange: R.onOpenChange,
|
|
344
|
+
title: R.context ? "Edit course" : "Create course",
|
|
345
|
+
description: "Courses link to content hosted elsewhere; CrewFoundry tracks who is enrolled and who has completed them.",
|
|
346
|
+
fields: D,
|
|
347
|
+
initialValues: R.context ? O(R.context) : { isActive: !0 },
|
|
348
|
+
submitLabel: R.context ? "Save changes" : "Create course",
|
|
349
|
+
errorMessage: Ae,
|
|
350
|
+
onValidationError: z,
|
|
351
|
+
onSubmit: Re
|
|
327
352
|
}),
|
|
328
|
-
/* @__PURE__ */
|
|
329
|
-
open:
|
|
330
|
-
onOpenChange:
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
duration: String(e.duration ?? ""),
|
|
342
|
-
level: String(e.level ?? "beginner"),
|
|
343
|
-
enrolled: 0,
|
|
344
|
-
completed: 0,
|
|
345
|
-
rating: 0,
|
|
346
|
-
status: String(e.status ?? "draft"),
|
|
347
|
-
description: String(e.description ?? ""),
|
|
348
|
-
modules: typeof e.modules == "number" ? e.modules : Number(e.modules) || 0,
|
|
349
|
-
skills: Array.isArray(e.skills) ? e.skills : []
|
|
350
|
-
});
|
|
351
|
-
}
|
|
353
|
+
/* @__PURE__ */ s(l, {
|
|
354
|
+
open: U !== null,
|
|
355
|
+
onOpenChange: (e) => {
|
|
356
|
+
e || W(null);
|
|
357
|
+
},
|
|
358
|
+
children: /* @__PURE__ */ c(_e, { children: [/* @__PURE__ */ c(be, { children: [/* @__PURE__ */ s(xe, { children: "Delete course?" }), /* @__PURE__ */ s(ve, { children: U ? `“${U.title}” is removed from the catalog. Existing enrollment records are kept for your history. To keep the course but stop new enrollments, archive it instead.` : "" })] }), /* @__PURE__ */ c(ye, { children: [/* @__PURE__ */ s(ge, { children: "Cancel" }), /* @__PURE__ */ s(he, {
|
|
359
|
+
onClick: (e) => {
|
|
360
|
+
e.preventDefault();
|
|
361
|
+
let t = U;
|
|
362
|
+
W(null), t && Q(() => ke(t.id));
|
|
363
|
+
},
|
|
364
|
+
children: "Delete"
|
|
365
|
+
})] })] })
|
|
352
366
|
})
|
|
353
367
|
]
|
|
354
368
|
});
|
|
355
369
|
}
|
|
356
370
|
//#endregion
|
|
357
|
-
export {
|
|
371
|
+
export { D as COURSE_FIELDS, A as LEARNING_TABS, j as LearningCoursesPagePage, O as courseToValues, k as valuesToCourseInput };
|
|
358
372
|
|
|
359
373
|
//# sourceMappingURL=LearningCoursesPagePage.js.map
|