@burdenoff/microfe-crewfoundry 2026.624.1 → 2026.625.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/pages/AdminAdminPagePage.js +100 -76
- package/dist/crewfoundry/pages/AdminAdminPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsAnalyticsPagePage.js +118 -94
- package/dist/crewfoundry/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.js +105 -81
- package/dist/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js +134 -110
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js +121 -97
- package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +28 -15
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js +74 -54
- package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsDirectoryPagePage.js +87 -69
- package/dist/crewfoundry/pages/CommunicationsDirectoryPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsFilesPagePage.js +99 -80
- package/dist/crewfoundry/pages/CommunicationsFilesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js +87 -68
- package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js +31 -15
- package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js +81 -61
- package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +71 -51
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyCompanyDashboardPagePage.js +82 -58
- package/dist/crewfoundry/pages/CompanyCompanyDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js +46 -39
- package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +80 -62
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js +104 -80
- package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js +219 -151
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js +183 -142
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardExecutiveDashboardPage.js +121 -97
- package/dist/crewfoundry/pages/DashboardExecutiveDashboardPage.js.map +1 -1
- package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js +57 -46
- package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringApplicationsPagePage.js +91 -67
- package/dist/crewfoundry/pages/HiringApplicationsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +112 -93
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCreateJobPagePage.js +55 -48
- package/dist/crewfoundry/pages/HiringCreateJobPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +70 -50
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +140 -97
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobsPagePage.js +101 -85
- package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +68 -48
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrEmployeesPagePage.js +99 -71
- package/dist/crewfoundry/pages/HrEmployeesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +97 -73
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrPayrollPagePage.js +100 -76
- package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +93 -69
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js +65 -45
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.js +93 -75
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js +117 -72
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js +66 -54
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js +36 -20
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.js +90 -66
- package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPagePage.js +81 -57
- package/dist/crewfoundry/pages/LearningLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +90 -65
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js +33 -17
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningMyLearningPagePage.js +83 -59
- package/dist/crewfoundry/pages/LearningMyLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js +68 -48
- package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js +80 -60
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js +153 -118
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js +42 -37
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js +67 -47
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js +104 -85
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.js +76 -57
- package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js +78 -60
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js +138 -93
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js +98 -53
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsEscrowPagePage.js +69 -49
- package/dist/crewfoundry/pages/PaymentsEscrowPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js +84 -65
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js +76 -52
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js +58 -40
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsSecurityPagePage.js +85 -65
- package/dist/crewfoundry/pages/PaymentsSecurityPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsCreateProjectPagePage.js +36 -29
- package/dist/crewfoundry/pages/ProjectsCreateProjectPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js +108 -73
- package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js +43 -27
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js +67 -47
- package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js +108 -63
- package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js +83 -64
- package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js +185 -144
- package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js +40 -24
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
2
2
|
import { useMemo as t, useState as n } from "react";
|
|
3
3
|
import { Download as r, File as i, FileText as a, Image as o, Search as s, Upload as c } from "lucide-react";
|
|
4
|
-
import {
|
|
5
|
-
import { Badge as
|
|
4
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
5
|
+
import { Badge as f, Button as p, CardContent as m, CardHeader as h, CardTitle as g, GlassCard as _, GradientText as v, IllustratedEmptyState as y, Input as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
|
|
6
6
|
//#region src/crewfoundry/pages/CommunicationsFilesPagePage.tsx
|
|
7
|
-
var
|
|
7
|
+
var S = (e) => e === "image" ? /* @__PURE__ */ u(o, { className: "h-5 w-5 text-action-primary-bg" }) : e === "pdf" ? /* @__PURE__ */ u(a, { className: "h-5 w-5 text-status-error-text" }) : /* @__PURE__ */ u(i, { className: "h-5 w-5 text-status-info-text" }), C = (e) => {
|
|
8
8
|
let t = new Date(e);
|
|
9
9
|
return Number.isNaN(t.getTime()) ? "Unknown" : t.toISOString().split("T")[0];
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
let [i, a] = n(""), { announcements: o, invoices:
|
|
11
|
+
function w() {
|
|
12
|
+
let [i, a] = n(""), { announcements: o, invoices: w, projects: T, employees: E } = e(), D = t(() => {
|
|
13
13
|
let e = o.slice(0, 8).map((e, t) => {
|
|
14
|
-
let n =
|
|
14
|
+
let n = E[t % Math.max(E.length, 1)];
|
|
15
15
|
return {
|
|
16
16
|
id: `announcement-${e.id}`,
|
|
17
17
|
name: `${e.title}.pdf`,
|
|
18
18
|
type: "pdf",
|
|
19
19
|
size: `${Math.max(1, Math.round(e.content.length / 300))}.${t % 9} MB`,
|
|
20
20
|
uploadedBy: n ? `${n.firstName} ${n.lastName}`.trim() : e.author,
|
|
21
|
-
date:
|
|
21
|
+
date: C(e.createdAt),
|
|
22
22
|
department: n?.department || "Operations"
|
|
23
23
|
};
|
|
24
|
-
}), t =
|
|
24
|
+
}), t = w.slice(0, 6).map((e, t) => ({
|
|
25
25
|
id: `invoice-${e.id}`,
|
|
26
26
|
name: `${e.number}-invoice.xlsx`,
|
|
27
27
|
type: "spreadsheet",
|
|
28
28
|
size: `${(e.amount / 1e3).toFixed(1)} MB`,
|
|
29
29
|
uploadedBy: e.clientName,
|
|
30
|
-
date:
|
|
30
|
+
date: C(e.issueDate),
|
|
31
31
|
department: t % 2 == 0 ? "Finance" : "Billing"
|
|
32
|
-
})), n =
|
|
32
|
+
})), n = T.slice(0, 6).map((e, t) => ({
|
|
33
33
|
id: `project-${e.id}`,
|
|
34
34
|
name: `${e.name}-brief.docx`,
|
|
35
35
|
type: t % 2 == 0 ? "doc" : "image",
|
|
36
36
|
size: `${(Math.max(e.tasks, 1) / 10).toFixed(1)} MB`,
|
|
37
37
|
uploadedBy: e.managerName,
|
|
38
|
-
date:
|
|
38
|
+
date: C(e.startDate),
|
|
39
39
|
department: "Projects"
|
|
40
40
|
}));
|
|
41
41
|
return [
|
|
@@ -45,94 +45,113 @@ function b() {
|
|
|
45
45
|
];
|
|
46
46
|
}, [
|
|
47
47
|
o,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
]),
|
|
52
|
-
return /* @__PURE__ */
|
|
48
|
+
E,
|
|
49
|
+
w,
|
|
50
|
+
T
|
|
51
|
+
]), O = D.filter((e) => e.name.toLowerCase().includes(i.toLowerCase()));
|
|
52
|
+
return /* @__PURE__ */ d("div", {
|
|
53
53
|
className: "space-y-6 p-6",
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ d("div", {
|
|
56
56
|
className: "flex items-center justify-between",
|
|
57
|
-
children: [/* @__PURE__ */
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
children: [/* @__PURE__ */ d("div", { children: [
|
|
58
|
+
/* @__PURE__ */ u("h1", {
|
|
59
|
+
className: "text-2xl font-semibold",
|
|
60
|
+
children: /* @__PURE__ */ u(v, { children: "Shared Files" })
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ d("p", {
|
|
63
|
+
className: "text-sm text-text-secondary",
|
|
64
|
+
children: [D.length, " files shared across teams"]
|
|
65
|
+
}),
|
|
66
|
+
/* @__PURE__ */ u(x, {
|
|
67
|
+
className: "mt-1",
|
|
68
|
+
children: "A shared space for company documents and files — store, search, and share the resources your teams need to get work done."
|
|
69
|
+
})
|
|
70
|
+
] }), /* @__PURE__ */ d(p, {
|
|
64
71
|
size: "sm",
|
|
65
|
-
children: [/* @__PURE__ */
|
|
72
|
+
children: [/* @__PURE__ */ u(c, { className: "mr-1 h-4 w-4" }), "Upload File"]
|
|
66
73
|
})]
|
|
67
74
|
}),
|
|
68
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ d("div", {
|
|
69
76
|
className: "relative max-w-sm",
|
|
70
|
-
children: [/* @__PURE__ */
|
|
77
|
+
children: [/* @__PURE__ */ u(s, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ u(b, {
|
|
71
78
|
placeholder: "Search files...",
|
|
72
79
|
className: "pl-9",
|
|
73
80
|
value: i,
|
|
74
81
|
onChange: (e) => a(e.target.value)
|
|
75
82
|
})]
|
|
76
83
|
}),
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
/* @__PURE__ */ l("span", {
|
|
90
|
-
className: "text-right",
|
|
91
|
-
children: "Size"
|
|
84
|
+
/* @__PURE__ */ d(_, {
|
|
85
|
+
treatment: "glass",
|
|
86
|
+
glow: !0,
|
|
87
|
+
className: "border-border-seam",
|
|
88
|
+
children: [/* @__PURE__ */ u(h, { children: /* @__PURE__ */ u(g, { children: "Workspace Files" }) }), /* @__PURE__ */ u(m, {
|
|
89
|
+
className: "p-0",
|
|
90
|
+
children: O.length === 0 ? /* @__PURE__ */ u("div", {
|
|
91
|
+
className: "p-6",
|
|
92
|
+
children: /* @__PURE__ */ u(y, {
|
|
93
|
+
illustration: "empty-files",
|
|
94
|
+
title: "No files found",
|
|
95
|
+
description: "Upload a file or adjust your search to see results here."
|
|
92
96
|
})
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
children: [/* @__PURE__ */ l("span", {
|
|
97
|
+
}) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ d("div", {
|
|
98
|
+
className: "grid grid-cols-6 gap-2 border-b p-4 text-xs font-medium text-text-secondary",
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ u("span", {
|
|
101
|
+
className: "col-span-2",
|
|
102
|
+
children: "Name"
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ u("span", { children: "Uploaded By" }),
|
|
105
|
+
/* @__PURE__ */ u("span", { children: "Department" }),
|
|
106
|
+
/* @__PURE__ */ u("span", { children: "Date" }),
|
|
107
|
+
/* @__PURE__ */ u("span", {
|
|
108
|
+
className: "text-right",
|
|
109
|
+
children: "Size"
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
}), O.map((e) => /* @__PURE__ */ d("div", {
|
|
113
|
+
className: "grid grid-cols-6 items-center gap-2 border-b px-4 py-3 text-sm last:border-0 hover:bg-bg-sunken/50",
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ d("div", {
|
|
116
|
+
className: "col-span-2 flex items-center gap-2",
|
|
117
|
+
children: [S(e.type), /* @__PURE__ */ u("span", {
|
|
118
|
+
className: "truncate font-medium",
|
|
119
|
+
children: e.name
|
|
120
|
+
})]
|
|
121
|
+
}),
|
|
122
|
+
/* @__PURE__ */ u("span", {
|
|
120
123
|
className: "text-text-secondary",
|
|
121
|
-
children: e.
|
|
122
|
-
}),
|
|
124
|
+
children: e.uploadedBy
|
|
125
|
+
}),
|
|
126
|
+
/* @__PURE__ */ u(f, {
|
|
123
127
|
variant: "outline",
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
className: "w-fit text-[10px]",
|
|
129
|
+
children: e.department
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ u("span", {
|
|
132
|
+
className: "text-text-secondary",
|
|
133
|
+
children: e.date
|
|
134
|
+
}),
|
|
135
|
+
/* @__PURE__ */ d("div", {
|
|
136
|
+
className: "flex items-center justify-end gap-2",
|
|
137
|
+
children: [/* @__PURE__ */ u("span", {
|
|
138
|
+
className: "text-text-secondary",
|
|
139
|
+
children: e.size
|
|
140
|
+
}), /* @__PURE__ */ u(p, {
|
|
141
|
+
variant: "outline",
|
|
142
|
+
size: "sm",
|
|
143
|
+
className: "h-7",
|
|
144
|
+
children: /* @__PURE__ */ u(r, { className: "h-3 w-3" })
|
|
145
|
+
})]
|
|
146
|
+
})
|
|
147
|
+
]
|
|
148
|
+
}, e.id))] })
|
|
149
|
+
})]
|
|
150
|
+
})
|
|
132
151
|
]
|
|
133
152
|
});
|
|
134
153
|
}
|
|
135
154
|
//#endregion
|
|
136
|
-
export {
|
|
155
|
+
export { w as CommunicationsFilesPagePage };
|
|
137
156
|
|
|
138
157
|
//# sourceMappingURL=CommunicationsFilesPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommunicationsFilesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/CommunicationsFilesPagePage.tsx"],"sourcesContent":["import { useMemo, useState } from 'react';\nimport {\n Badge,\n Button,\n
|
|
1
|
+
{"version":3,"file":"CommunicationsFilesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/CommunicationsFilesPagePage.tsx"],"sourcesContent":["import { useMemo, useState } from 'react';\nimport {\n Badge,\n Button,\n CardContent,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { Download, File, FileText, Image, Search, Upload } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\ntype SharedFile = {\n id: string;\n name: string;\n type: 'pdf' | 'spreadsheet' | 'image' | 'doc';\n size: string;\n uploadedBy: string;\n date: string;\n department: string;\n};\n\nconst fileIcon = (type: SharedFile['type']) => {\n if (type === 'image') return <Image className=\"h-5 w-5 text-action-primary-bg\" />;\n if (type === 'pdf') return <FileText className=\"h-5 w-5 text-status-error-text\" />;\n return <File className=\"h-5 w-5 text-status-info-text\" />;\n};\n\nconst formatDate = (input: string): string => {\n const parsed = new Date(input);\n if (Number.isNaN(parsed.getTime())) {\n return 'Unknown';\n }\n return parsed.toISOString().split('T')[0];\n};\n\nexport function CommunicationsFilesPagePage() {\n const [search, setSearch] = useState('');\n const { announcements, invoices, projects, employees } = useCrewFoundryStore();\n\n const sharedFiles = useMemo<SharedFile[]>(() => {\n const announcementFiles = announcements.slice(0, 8).map((announcement, index) => {\n const uploader = employees[index % Math.max(employees.length, 1)];\n return {\n id: `announcement-${announcement.id}`,\n name: `${announcement.title}.pdf`,\n type: 'pdf' as const,\n size: `${Math.max(1, Math.round(announcement.content.length / 300))}.${index % 9} MB`,\n uploadedBy: uploader\n ? `${uploader.firstName} ${uploader.lastName}`.trim()\n : announcement.author,\n date: formatDate(announcement.createdAt),\n department: uploader?.department || 'Operations',\n };\n });\n\n const financeFiles = invoices.slice(0, 6).map((invoice, index) => ({\n id: `invoice-${invoice.id}`,\n name: `${invoice.number}-invoice.xlsx`,\n type: 'spreadsheet' as const,\n size: `${(invoice.amount / 1000).toFixed(1)} MB`,\n uploadedBy: invoice.clientName,\n date: formatDate(invoice.issueDate),\n department: index % 2 === 0 ? 'Finance' : 'Billing',\n }));\n\n const projectFiles = projects.slice(0, 6).map((project, index) => ({\n id: `project-${project.id}`,\n name: `${project.name}-brief.docx`,\n type: index % 2 === 0 ? ('doc' as const) : ('image' as const),\n size: `${(Math.max(project.tasks, 1) / 10).toFixed(1)} MB`,\n uploadedBy: project.managerName,\n date: formatDate(project.startDate),\n department: 'Projects',\n }));\n\n return [...announcementFiles, ...financeFiles, ...projectFiles];\n }, [announcements, employees, invoices, projects]);\n\n const filteredFiles = sharedFiles.filter((file) =>\n file.name.toLowerCase().includes(search.toLowerCase())\n );\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Shared Files</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n {sharedFiles.length} files shared across teams\n </p>\n <PagePurpose className=\"mt-1\">A shared space for company documents and files — store, search, and share the resources your teams need to get work done.</PagePurpose>\n </div>\n <Button size=\"sm\">\n <Upload className=\"mr-1 h-4 w-4\" />\n Upload File\n </Button>\n </div>\n\n <div className=\"relative max-w-sm\">\n <Search className=\"absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-text-secondary\" />\n <Input\n placeholder=\"Search files...\"\n className=\"pl-9\"\n value={search}\n onChange={(event) => setSearch(event.target.value)}\n />\n </div>\n\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam\">\n <CardHeader>\n <CardTitle>Workspace Files</CardTitle>\n </CardHeader>\n <CardContent className=\"p-0\">\n {filteredFiles.length === 0 ? (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-files\"\n title=\"No files found\"\n description=\"Upload a file or adjust your search to see results here.\"\n />\n </div>\n ) : (\n <>\n <div className=\"grid grid-cols-6 gap-2 border-b p-4 text-xs font-medium text-text-secondary\">\n <span className=\"col-span-2\">Name</span>\n <span>Uploaded By</span>\n <span>Department</span>\n <span>Date</span>\n <span className=\"text-right\">Size</span>\n </div>\n {filteredFiles.map((file) => (\n <div\n key={file.id}\n className=\"grid grid-cols-6 items-center gap-2 border-b px-4 py-3 text-sm last:border-0 hover:bg-bg-sunken/50\"\n >\n <div className=\"col-span-2 flex items-center gap-2\">\n {fileIcon(file.type)}\n <span className=\"truncate font-medium\">{file.name}</span>\n </div>\n <span className=\"text-text-secondary\">{file.uploadedBy}</span>\n <Badge variant=\"outline\" className=\"w-fit text-[10px]\">\n {file.department}\n </Badge>\n <span className=\"text-text-secondary\">{file.date}</span>\n <div className=\"flex items-center justify-end gap-2\">\n <span className=\"text-text-secondary\">{file.size}</span>\n <Button variant=\"outline\" size=\"sm\" className=\"h-7\">\n <Download className=\"h-3 w-3\" />\n </Button>\n </div>\n </div>\n ))}\n </>\n )}\n </CardContent>\n </GlassCard>\n </div>\n );\n}\n"],"mappings":";;;;;;AA0BA,IAAM,KAAY,MACZ,MAAS,UAAgB,kBAAC,GAAD,EAAO,WAAU,kCAAmC,CAAA,GAC7E,MAAS,QAAc,kBAAC,GAAD,EAAU,WAAU,kCAAmC,CAAA,GAC3E,kBAAC,GAAD,EAAM,WAAU,iCAAkC,CAAA,EAGrD,KAAc,MAA0B;CAC5C,IAAM,IAAS,IAAI,KAAK,EAAM;AAI9B,QAHI,OAAO,MAAM,EAAO,SAAS,CAAC,GACzB,YAEF,EAAO,aAA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UAAM,eAAkB,CAAA;OACxB,kBAAC,QAAD,EAAA,UAAM,cAAiB,CAAA;OACvB,kBAAC,QAAD,EAAA,UAAM,QAAW,CAAA;OACjB,kBAAC,QAAD;QAAM,WAAU;kBAAa;QAAW,CAAA;OACpC;SACL,EAAc,KAAK,MACtB,kBAAC,OAAD;MAEE,WAAU;gBAFZ;OAIE,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACG,EAAS,EAAK,KAAK,EACpB,kBAAC,QAAD;SAAM,WAAU;mBAAwB,EAAK;SAAY,CAAA,CACrD;;OACN,kBAAC,QAAD;QAAM,WAAU;kBAAuB,EAAK;QAAkB,CAAA;OAC9D,kBAAC,GAAD;QAAO,SAAQ;QAAU,WAAU;kBAChC,EAAK;QACA,CAAA;OACR,kBAAC,QAAD;QAAM,WAAU;kBAAuB,EAAK;QAAY,CAAA;OACxD,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,QAAD;SAAM,WAAU;mBAAuB,EAAK;SAAY,CAAA,EACxD,kBAAC,GAAD;SAAQ,SAAQ;SAAU,MAAK;SAAK,WAAU;mBAC5C,kBAAC,GAAD,EAAU,WAAU,WAAY,CAAA;SACzB,CAAA,CACL;;OACF;QAlBC,EAAK,GAkBN,CACF,CACD,EAAA,CAAA;KAEO,CAAA,CACJ;;GACR"}
|
|
@@ -2,117 +2,136 @@ import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
|
2
2
|
import { useMemo as t, useState as n } from "react";
|
|
3
3
|
import { MessageSquare as r, Search as i } from "lucide-react";
|
|
4
4
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
-
import { Badge as s, Button as c,
|
|
5
|
+
import { Badge as s, Button as c, CardContent as l, CardHeader as u, CardTitle as d, GlassCard as f, GradientText as p, IllustratedEmptyState as m, Input as h, PagePurpose as g } from "@burdenoff/fe-libs/ui";
|
|
6
6
|
//#region src/crewfoundry/pages/CommunicationsMessagesPagePage.tsx
|
|
7
|
-
var
|
|
7
|
+
var _ = (e) => {
|
|
8
8
|
let t = new Date(e);
|
|
9
9
|
if (Number.isNaN(t.getTime())) return "Recently";
|
|
10
10
|
let n = Date.now() - t.getTime(), r = Math.max(0, Math.floor(n / (1e3 * 60 * 60)));
|
|
11
11
|
return r < 1 ? "Just now" : r < 24 ? `${r}h ago` : `${Math.floor(r / 24)}d ago`;
|
|
12
12
|
};
|
|
13
|
-
function
|
|
14
|
-
let [
|
|
15
|
-
let e =
|
|
16
|
-
let n =
|
|
13
|
+
function v() {
|
|
14
|
+
let [v, y] = n(""), { teams: b, employees: x, announcements: S, notifications: C } = e(), w = t(() => {
|
|
15
|
+
let e = x.slice(0, 8).map((e, t) => {
|
|
16
|
+
let n = S[t % Math.max(S.length, 1)], r = n?.content || `Status update for ${e.department} initiatives.`;
|
|
17
17
|
return {
|
|
18
18
|
id: `person-${e.id}`,
|
|
19
19
|
name: `${e.firstName} ${e.lastName}`.trim(),
|
|
20
20
|
role: e.position,
|
|
21
21
|
lastMessage: r,
|
|
22
|
-
time:
|
|
22
|
+
time: _(n?.createdAt || e.startDate),
|
|
23
23
|
unread: Math.min(3, Math.round(e.performanceScore) % 4),
|
|
24
24
|
online: e.status === "active" && t % 2 == 0
|
|
25
25
|
};
|
|
26
|
-
}), t =
|
|
27
|
-
let n =
|
|
26
|
+
}), t = b.slice(0, 5).map((e, t) => {
|
|
27
|
+
let n = C.slice(t, t + 3).filter((e) => !e.read).length;
|
|
28
28
|
return {
|
|
29
29
|
id: `team-${e.id}`,
|
|
30
30
|
name: `#${e.name.toLowerCase().replaceAll(" ", "-")}`,
|
|
31
31
|
role: `Channel · ${e.memberCount} members`,
|
|
32
|
-
lastMessage:
|
|
33
|
-
time:
|
|
32
|
+
lastMessage: S[t % Math.max(S.length, 1)]?.title || `${e.leadName} posted an update in ${e.name}.`,
|
|
33
|
+
time: _(e.createdAt),
|
|
34
34
|
unread: n,
|
|
35
35
|
online: !1
|
|
36
36
|
};
|
|
37
37
|
});
|
|
38
38
|
return [...e, ...t];
|
|
39
39
|
}, [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
]).filter((e) => e.name.toLowerCase().includes(
|
|
40
|
+
S,
|
|
41
|
+
x,
|
|
42
|
+
C,
|
|
43
|
+
b
|
|
44
|
+
]).filter((e) => e.name.toLowerCase().includes(v.toLowerCase()));
|
|
45
45
|
return /* @__PURE__ */ o("div", {
|
|
46
46
|
className: "space-y-6 p-6",
|
|
47
47
|
children: [
|
|
48
48
|
/* @__PURE__ */ o("div", {
|
|
49
49
|
className: "flex items-center justify-between",
|
|
50
|
-
children: [/* @__PURE__ */ o("div", { children: [
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
children: [/* @__PURE__ */ o("div", { children: [
|
|
51
|
+
/* @__PURE__ */ a("h1", {
|
|
52
|
+
className: "text-2xl font-semibold",
|
|
53
|
+
children: /* @__PURE__ */ a(p, { children: "Messages" })
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ a("p", {
|
|
56
|
+
className: "text-sm text-text-secondary",
|
|
57
|
+
children: "Team conversations and channels"
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ a(g, {
|
|
60
|
+
className: "mt-1",
|
|
61
|
+
children: "Chat directly with colleagues and keep conversations in one thread — use it for quick questions, follow-ups, and day-to-day coordination."
|
|
62
|
+
})
|
|
63
|
+
] }), /* @__PURE__ */ o(c, {
|
|
57
64
|
size: "sm",
|
|
58
65
|
children: [/* @__PURE__ */ a(r, { className: "mr-1 h-4 w-4" }), "New Message"]
|
|
59
66
|
})]
|
|
60
67
|
}),
|
|
61
68
|
/* @__PURE__ */ o("div", {
|
|
62
69
|
className: "relative max-w-sm",
|
|
63
|
-
children: [/* @__PURE__ */ a(i, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ a(
|
|
70
|
+
children: [/* @__PURE__ */ a(i, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ a(h, {
|
|
64
71
|
placeholder: "Search conversations...",
|
|
65
72
|
className: "pl-9",
|
|
66
|
-
value:
|
|
67
|
-
onChange: (e) =>
|
|
73
|
+
value: v,
|
|
74
|
+
onChange: (e) => y(e.target.value)
|
|
68
75
|
})]
|
|
69
76
|
}),
|
|
70
|
-
/* @__PURE__ */ o(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/* @__PURE__ */ o("div", {
|
|
83
|
-
className: "min-w-0 flex-1",
|
|
84
|
-
children: [
|
|
85
|
-
/* @__PURE__ */ o("div", {
|
|
86
|
-
className: "flex items-center justify-between",
|
|
87
|
-
children: [/* @__PURE__ */ a("p", {
|
|
88
|
-
className: "text-sm font-medium",
|
|
89
|
-
children: e.name
|
|
90
|
-
}), /* @__PURE__ */ a("span", {
|
|
91
|
-
className: "text-xs text-text-secondary",
|
|
92
|
-
children: e.time
|
|
93
|
-
})]
|
|
94
|
-
}),
|
|
95
|
-
/* @__PURE__ */ a("p", {
|
|
96
|
-
className: "text-xs text-text-secondary",
|
|
97
|
-
children: e.role
|
|
98
|
-
}),
|
|
99
|
-
/* @__PURE__ */ a("p", {
|
|
100
|
-
className: "mt-0.5 truncate text-xs text-text-secondary",
|
|
101
|
-
children: e.lastMessage
|
|
102
|
-
})
|
|
103
|
-
]
|
|
104
|
-
}),
|
|
105
|
-
e.unread > 0 && /* @__PURE__ */ a(s, {
|
|
106
|
-
className: "flex h-5 w-5 items-center justify-center rounded-full p-0 text-[10px]",
|
|
107
|
-
children: e.unread
|
|
77
|
+
/* @__PURE__ */ o(f, {
|
|
78
|
+
treatment: "glass",
|
|
79
|
+
glow: !0,
|
|
80
|
+
className: "border-border-seam",
|
|
81
|
+
children: [/* @__PURE__ */ a(u, { children: /* @__PURE__ */ a(d, { children: "Conversation Inbox" }) }), /* @__PURE__ */ a(l, {
|
|
82
|
+
className: "p-0",
|
|
83
|
+
children: w.length === 0 ? /* @__PURE__ */ a("div", {
|
|
84
|
+
className: "p-6",
|
|
85
|
+
children: /* @__PURE__ */ a(m, {
|
|
86
|
+
illustration: "empty-notifications",
|
|
87
|
+
title: "No conversations",
|
|
88
|
+
description: "Messages with your colleagues will show up here."
|
|
108
89
|
})
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
90
|
+
}) : w.map((e) => /* @__PURE__ */ o("div", {
|
|
91
|
+
className: "flex cursor-pointer items-center gap-3 border-b p-4 last:border-0 hover:bg-bg-sunken/50",
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ o("div", {
|
|
94
|
+
className: "relative",
|
|
95
|
+
children: [/* @__PURE__ */ a("div", {
|
|
96
|
+
className: "flex h-10 w-10 items-center justify-center rounded-full bg-action-primary-bg/10 text-sm font-medium",
|
|
97
|
+
children: e.name.startsWith("#") ? "#" : e.name.split(" ").map((e) => e[0]).join("")
|
|
98
|
+
}), e.online && /* @__PURE__ */ a("div", { className: "absolute right-0 bottom-0 h-3 w-3 rounded-full border-2 border-background bg-status-success-text" })]
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ o("div", {
|
|
101
|
+
className: "min-w-0 flex-1",
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ o("div", {
|
|
104
|
+
className: "flex items-center justify-between",
|
|
105
|
+
children: [/* @__PURE__ */ a("p", {
|
|
106
|
+
className: "text-sm font-medium",
|
|
107
|
+
children: e.name
|
|
108
|
+
}), /* @__PURE__ */ a("span", {
|
|
109
|
+
className: "text-xs text-text-secondary",
|
|
110
|
+
children: e.time
|
|
111
|
+
})]
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ a("p", {
|
|
114
|
+
className: "text-xs text-text-secondary",
|
|
115
|
+
children: e.role
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ a("p", {
|
|
118
|
+
className: "mt-0.5 truncate text-xs text-text-secondary",
|
|
119
|
+
children: e.lastMessage
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
}),
|
|
123
|
+
e.unread > 0 && /* @__PURE__ */ a(s, {
|
|
124
|
+
className: "flex h-5 w-5 items-center justify-center rounded-full p-0 text-[10px]",
|
|
125
|
+
children: e.unread
|
|
126
|
+
})
|
|
127
|
+
]
|
|
128
|
+
}, e.id))
|
|
129
|
+
})]
|
|
130
|
+
})
|
|
112
131
|
]
|
|
113
132
|
});
|
|
114
133
|
}
|
|
115
134
|
//#endregion
|
|
116
|
-
export {
|
|
135
|
+
export { v as CommunicationsMessagesPagePage };
|
|
117
136
|
|
|
118
137
|
//# sourceMappingURL=CommunicationsMessagesPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommunicationsMessagesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/CommunicationsMessagesPagePage.tsx"],"sourcesContent":["import { useMemo, useState } from 'react';\nimport {\n Badge,\n Button,\n
|
|
1
|
+
{"version":3,"file":"CommunicationsMessagesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/CommunicationsMessagesPagePage.tsx"],"sourcesContent":["import { useMemo, useState } from 'react';\nimport {\n Badge,\n Button,\n CardContent,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { MessageSquare, Search } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\ntype Conversation = {\n id: string;\n name: string;\n role: string;\n lastMessage: string;\n time: string;\n unread: number;\n online: boolean;\n};\n\nconst formatRelativeDate = (value: string): string => {\n const parsed = new Date(value);\n if (Number.isNaN(parsed.getTime())) {\n return 'Recently';\n }\n const diffMs = Date.now() - parsed.getTime();\n const diffHours = Math.max(0, Math.floor(diffMs / (1000 * 60 * 60)));\n if (diffHours < 1) return 'Just now';\n if (diffHours < 24) return `${diffHours}h ago`;\n const diffDays = Math.floor(diffHours / 24);\n return `${diffDays}d ago`;\n};\n\nexport function CommunicationsMessagesPagePage() {\n const [search, setSearch] = useState('');\n const { teams, employees, announcements, notifications } = useCrewFoundryStore();\n\n const conversations = useMemo<Conversation[]>(() => {\n const peopleConversations = employees.slice(0, 8).map((employee, index) => {\n const announcement = announcements[index % Math.max(announcements.length, 1)];\n const message =\n announcement?.content || `Status update for ${employee.department} initiatives.`;\n return {\n id: `person-${employee.id}`,\n name: `${employee.firstName} ${employee.lastName}`.trim(),\n role: employee.position,\n lastMessage: message,\n time: formatRelativeDate(announcement?.createdAt || employee.startDate),\n unread: Math.min(3, Math.round(employee.performanceScore) % 4),\n online: employee.status === 'active' && index % 2 === 0,\n };\n });\n\n const teamConversations = teams.slice(0, 5).map((team, index) => {\n const unread = notifications\n .slice(index, index + 3)\n .filter((notification) => !notification.read).length;\n return {\n id: `team-${team.id}`,\n name: `#${team.name.toLowerCase().replaceAll(' ', '-')}`,\n role: `Channel · ${team.memberCount} members`,\n lastMessage:\n announcements[index % Math.max(announcements.length, 1)]?.title ||\n `${team.leadName} posted an update in ${team.name}.`,\n time: formatRelativeDate(team.createdAt),\n unread,\n online: false,\n };\n });\n\n return [...peopleConversations, ...teamConversations];\n }, [announcements, employees, notifications, teams]);\n\n const filteredConversations = conversations.filter((conversation) =>\n conversation.name.toLowerCase().includes(search.toLowerCase())\n );\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Messages</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">Team conversations and channels</p>\n <PagePurpose className=\"mt-1\">Chat directly with colleagues and keep conversations in one thread — use it for quick questions, follow-ups, and day-to-day coordination.</PagePurpose>\n </div>\n <Button size=\"sm\">\n <MessageSquare className=\"mr-1 h-4 w-4\" />\n New Message\n </Button>\n </div>\n\n <div className=\"relative max-w-sm\">\n <Search className=\"absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-text-secondary\" />\n <Input\n placeholder=\"Search conversations...\"\n className=\"pl-9\"\n value={search}\n onChange={(event) => setSearch(event.target.value)}\n />\n </div>\n\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam\">\n <CardHeader>\n <CardTitle>Conversation Inbox</CardTitle>\n </CardHeader>\n <CardContent className=\"p-0\">\n {filteredConversations.length === 0 ? (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-notifications\"\n title=\"No conversations\"\n description=\"Messages with your colleagues will show up here.\"\n />\n </div>\n ) : (\n filteredConversations.map((conversation) => (\n <div\n key={conversation.id}\n className=\"flex cursor-pointer items-center gap-3 border-b p-4 last:border-0 hover:bg-bg-sunken/50\"\n >\n <div className=\"relative\">\n <div className=\"flex h-10 w-10 items-center justify-center rounded-full bg-action-primary-bg/10 text-sm font-medium\">\n {conversation.name.startsWith('#')\n ? '#'\n : conversation.name\n .split(' ')\n .map((part) => part[0])\n .join('')}\n </div>\n {conversation.online && (\n <div className=\"absolute right-0 bottom-0 h-3 w-3 rounded-full border-2 border-background bg-status-success-text\" />\n )}\n </div>\n\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center justify-between\">\n <p className=\"text-sm font-medium\">{conversation.name}</p>\n <span className=\"text-xs text-text-secondary\">{conversation.time}</span>\n </div>\n <p className=\"text-xs text-text-secondary\">{conversation.role}</p>\n <p className=\"mt-0.5 truncate text-xs text-text-secondary\">\n {conversation.lastMessage}\n </p>\n </div>\n\n {conversation.unread > 0 && (\n <Badge className=\"flex h-5 w-5 items-center justify-center rounded-full p-0 text-[10px]\">\n {conversation.unread}\n </Badge>\n )}\n </div>\n ))\n )}\n </CardContent>\n </GlassCard>\n </div>\n );\n}\n"],"mappings":";;;;;;AA0BA,IAAM,KAAsB,MAA0B;CACpD,IAAM,IAAS,IAAI,K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;OAIE,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,OAAD;SAAK,WAAU;mBACZ,EAAa,KAAK,WAAW,IAAI,GAC9B,MACA,EAAa,KACV,MAAM,IAAI,CACV,KAAK,MAAS,EAAK,GAAG,CACtB,KAAK,GAAG;SACX,CAAA,EACL,EAAa,UACZ,kBAAC,OAAD,EAAK,WAAU,oGAAqG,CAAA,CAElH;;OAEN,kBAAC,OAAD;QAAK,WAAU;kBAAf;SACE,kBAAC,OAAD;UAAK,WAAU;oBAAf,CACE,kBAAC,KAAD;WAAG,WAAU;qBAAuB,EAAa;WAAS,CAAA,EAC1D,kBAAC,QAAD;WAAM,WAAU;qBAA+B,EAAa;WAAY,CAAA,CACpE;;SACN,kBAAC,KAAD;UAAG,WAAU;oBAA+B,EAAa;UAAS,CAAA;SAClE,kBAAC,KAAD;UAAG,WAAU;oBACV,EAAa;UACZ,CAAA;SACA;;OAEL,EAAa,SAAS,KACrB,kBAAC,GAAD;QAAO,WAAU;kBACd,EAAa;QACR,CAAA;OAEN;QAjCC,EAAa,GAiCd,CACJ;KAEQ,CAAA,CACJ;;GACR"}
|
|
@@ -1,25 +1,41 @@
|
|
|
1
1
|
import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
2
2
|
import { FolderKanban as t, Users as n } from "lucide-react";
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
-
import { Badge as a,
|
|
4
|
+
import { Badge as a, CardContent as o, CardDescription as s, CardHeader as c, CardTitle as l, GlassCard as u, GradientText as d, IllustratedEmptyState as f, PagePurpose as p } from "@burdenoff/fe-libs/ui";
|
|
5
5
|
//#region src/crewfoundry/pages/CommunicationsTeamsPagePage.tsx
|
|
6
|
-
function
|
|
7
|
-
let { teams:
|
|
6
|
+
function m() {
|
|
7
|
+
let { teams: m } = e();
|
|
8
8
|
return /* @__PURE__ */ i("div", {
|
|
9
9
|
className: "space-y-6 p-6",
|
|
10
|
-
children: [/* @__PURE__ */ i("div", { children: [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
children: [/* @__PURE__ */ i("div", { children: [
|
|
11
|
+
/* @__PURE__ */ r("h1", {
|
|
12
|
+
className: "text-2xl font-semibold",
|
|
13
|
+
children: /* @__PURE__ */ r(d, { children: "Team Channels" })
|
|
14
|
+
}),
|
|
15
|
+
/* @__PURE__ */ i("p", {
|
|
16
|
+
className: "text-sm text-text-secondary",
|
|
17
|
+
children: [m.length, " active team channels"]
|
|
18
|
+
}),
|
|
19
|
+
/* @__PURE__ */ r(p, {
|
|
20
|
+
className: "mt-1",
|
|
21
|
+
children: "Jump into team channels to collaborate with your groups — a focused place for each team's ongoing discussion."
|
|
22
|
+
})
|
|
23
|
+
] }), /* @__PURE__ */ r("div", {
|
|
17
24
|
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
18
|
-
children:
|
|
25
|
+
children: m.length === 0 ? /* @__PURE__ */ r("div", {
|
|
26
|
+
className: "col-span-full",
|
|
27
|
+
children: /* @__PURE__ */ r(f, {
|
|
28
|
+
illustration: "empty-people",
|
|
29
|
+
title: "No team channels",
|
|
30
|
+
description: "Team channels will appear here once teams are created."
|
|
31
|
+
})
|
|
32
|
+
}) : m.map((e, d) => /* @__PURE__ */ i(u, {
|
|
33
|
+
treatment: d === 0 ? "glass" : "plain",
|
|
34
|
+
glow: d === 0,
|
|
19
35
|
className: "cursor-pointer hover:shadow-md transition-shadow",
|
|
20
|
-
children: [/* @__PURE__ */ i(
|
|
36
|
+
children: [/* @__PURE__ */ i(c, { children: [/* @__PURE__ */ i("div", {
|
|
21
37
|
className: "flex items-center justify-between",
|
|
22
|
-
children: [/* @__PURE__ */ r(
|
|
38
|
+
children: [/* @__PURE__ */ r(l, {
|
|
23
39
|
className: "text-base",
|
|
24
40
|
children: e.name
|
|
25
41
|
}), /* @__PURE__ */ r(a, {
|
|
@@ -27,7 +43,7 @@ function d() {
|
|
|
27
43
|
className: "text-[10px]",
|
|
28
44
|
children: e.status
|
|
29
45
|
})]
|
|
30
|
-
}), /* @__PURE__ */ r(
|
|
46
|
+
}), /* @__PURE__ */ r(s, { children: e.description })] }), /* @__PURE__ */ i(o, { children: [/* @__PURE__ */ i("div", {
|
|
31
47
|
className: "flex items-center justify-between text-sm text-text-secondary",
|
|
32
48
|
children: [/* @__PURE__ */ i("span", {
|
|
33
49
|
className: "flex items-center gap-1",
|
|
@@ -57,6 +73,6 @@ function d() {
|
|
|
57
73
|
});
|
|
58
74
|
}
|
|
59
75
|
//#endregion
|
|
60
|
-
export {
|
|
76
|
+
export { m as CommunicationsTeamsPagePage };
|
|
61
77
|
|
|
62
78
|
//# sourceMappingURL=CommunicationsTeamsPagePage.js.map
|