@burdenoff/microfe-crewfoundry 2026.625.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 +37 -29
- package/dist/crewfoundry/pages/AdminAdminPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsAnalyticsPagePage.js +50 -42
- package/dist/crewfoundry/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.js +39 -31
- package/dist/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js +52 -44
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js +46 -38
- 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 +30 -22
- 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 +86 -67
- 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 +37 -29
- package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +29 -21
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyCompanyDashboardPagePage.js +25 -17
- package/dist/crewfoundry/pages/CompanyCompanyDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js +42 -35
- 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 +41 -33
- package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js +142 -108
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js +177 -136
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardExecutiveDashboardPage.js +44 -36
- package/dist/crewfoundry/pages/DashboardExecutiveDashboardPage.js.map +1 -1
- package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js +49 -38
- package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringApplicationsPagePage.js +26 -18
- 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 +53 -46
- package/dist/crewfoundry/pages/HiringCreateJobPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +31 -23
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +129 -90
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobsPagePage.js +96 -85
- package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +26 -18
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrEmployeesPagePage.js +47 -35
- package/dist/crewfoundry/pages/HrEmployeesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +33 -25
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrPayrollPagePage.js +36 -28
- package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +27 -19
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js +27 -19
- 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 +111 -70
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js +65 -53
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js +35 -19
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.js +33 -25
- package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPagePage.js +26 -18
- package/dist/crewfoundry/pages/LearningLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +80 -55
- 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 +31 -23
- package/dist/crewfoundry/pages/LearningMyLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js +29 -21
- package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js +35 -27
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js +147 -112
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js +31 -27
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js +31 -23
- 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 +75 -56
- 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 +133 -92
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js +93 -52
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsEscrowPagePage.js +28 -20
- 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 +25 -17
- 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 +41 -33
- 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 +103 -72
- 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 +28 -20
- package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js +103 -62
- 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
|
@@ -2,39 +2,46 @@ import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
3
|
import { Clock as n, Phone as r, PhoneIncoming as i, PhoneMissed as a, PhoneOutgoing as o } from "lucide-react";
|
|
4
4
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
|
-
import { Badge as l, Button as u, Card as d, CardContent as f, CardHeader as p, CardTitle as m, GlassCard as h, GradientText as g } from "@burdenoff/fe-libs/ui";
|
|
5
|
+
import { Badge as l, Button as u, Card as d, CardContent as f, CardHeader as p, CardTitle as m, GlassCard as h, GradientText as g, PagePurpose as _ } from "@burdenoff/fe-libs/ui";
|
|
6
6
|
//#region src/crewfoundry/pages/CommunicationsCallsPagePage.tsx
|
|
7
|
-
var
|
|
7
|
+
var v = (e) => {
|
|
8
8
|
let t = Math.max(e, 0), n = Math.floor(t / 60), r = t % 60;
|
|
9
9
|
return n > 0 ? `${String(n).padStart(2, "0")}:${String(r).padStart(2, "0")}` : `00:${String(r).padStart(2, "0")}`;
|
|
10
|
-
},
|
|
11
|
-
function
|
|
12
|
-
let { employees: i, teams: o } = e(),
|
|
10
|
+
}, y = ({ type: e }) => e === "incoming" ? /* @__PURE__ */ s(i, { className: "h-4 w-4 text-status-success-text" }) : e === "outgoing" ? /* @__PURE__ */ s(o, { className: "h-4 w-4 text-status-info-text" }) : /* @__PURE__ */ s(a, { className: "h-4 w-4 text-status-error-text" });
|
|
11
|
+
function b() {
|
|
12
|
+
let { employees: i, teams: o } = e(), b = t(() => i.slice(0, 10).map((e, t) => {
|
|
13
13
|
let n = t % 5 == 0 ? "missed" : t % 2 == 0 ? "outgoing" : "incoming", r = o[t % Math.max(o.length, 1)], i = Math.round((e.performanceScore + t) * 3);
|
|
14
14
|
return {
|
|
15
15
|
id: `call-${e.id}`,
|
|
16
16
|
name: `${e.firstName} ${e.lastName}`.trim(),
|
|
17
17
|
type: n,
|
|
18
|
-
duration: n === "missed" ? "-" :
|
|
18
|
+
duration: n === "missed" ? "-" : v(i),
|
|
19
19
|
time: new Date(e.startDate).toLocaleDateString(),
|
|
20
20
|
topic: r ? `${r.name} check-in` : `${e.department} operations update`
|
|
21
21
|
};
|
|
22
|
-
}), [i, o]),
|
|
22
|
+
}), [i, o]), x = b.filter((e) => e.duration !== "-"), S = x.length ? Math.round(x.map((e) => {
|
|
23
23
|
let [t, n] = e.duration.split(":").map(Number);
|
|
24
24
|
return t * 60 + n;
|
|
25
|
-
}).reduce((e, t) => e + t, 0) /
|
|
25
|
+
}).reduce((e, t) => e + t, 0) / x.length) : 0;
|
|
26
26
|
return /* @__PURE__ */ c("div", {
|
|
27
27
|
className: "space-y-6 p-6",
|
|
28
28
|
children: [
|
|
29
29
|
/* @__PURE__ */ c("div", {
|
|
30
30
|
className: "flex items-center justify-between",
|
|
31
|
-
children: [/* @__PURE__ */ c("div", { children: [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
children: [/* @__PURE__ */ c("div", { children: [
|
|
32
|
+
/* @__PURE__ */ s("h1", {
|
|
33
|
+
className: "text-2xl font-semibold",
|
|
34
|
+
children: /* @__PURE__ */ s(g, { children: "Calls" })
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ s("p", {
|
|
37
|
+
className: "text-sm text-text-secondary",
|
|
38
|
+
children: "Voice call history and quick dial"
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ s(_, {
|
|
41
|
+
className: "mt-1",
|
|
42
|
+
children: "Review your call history and start new voice calls with colleagues — a quick way to reach teammates without leaving CrewFoundry."
|
|
43
|
+
})
|
|
44
|
+
] }), /* @__PURE__ */ c(u, {
|
|
38
45
|
size: "sm",
|
|
39
46
|
children: [/* @__PURE__ */ s(r, { className: "mr-1 h-4 w-4" }), "New Call"]
|
|
40
47
|
})]
|
|
@@ -43,7 +50,8 @@ function y() {
|
|
|
43
50
|
className: "grid gap-4 md:grid-cols-3",
|
|
44
51
|
children: [
|
|
45
52
|
/* @__PURE__ */ c(h, {
|
|
46
|
-
treatment: "
|
|
53
|
+
treatment: "glass",
|
|
54
|
+
glow: !0,
|
|
47
55
|
className: "border-border-seam",
|
|
48
56
|
children: [/* @__PURE__ */ c(p, {
|
|
49
57
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
@@ -53,7 +61,7 @@ function y() {
|
|
|
53
61
|
}), /* @__PURE__ */ s(r, { className: "h-4 w-4 text-text-secondary" })]
|
|
54
62
|
}), /* @__PURE__ */ c(f, { children: [/* @__PURE__ */ s("div", {
|
|
55
63
|
className: "text-2xl font-bold tabular-nums",
|
|
56
|
-
children:
|
|
64
|
+
children: b.length
|
|
57
65
|
}), /* @__PURE__ */ s("p", {
|
|
58
66
|
className: "text-xs text-text-secondary",
|
|
59
67
|
children: "Live call activity"
|
|
@@ -70,7 +78,7 @@ function y() {
|
|
|
70
78
|
}), /* @__PURE__ */ s(a, { className: "h-4 w-4 text-status-error-text" })]
|
|
71
79
|
}), /* @__PURE__ */ s(f, { children: /* @__PURE__ */ s("div", {
|
|
72
80
|
className: "text-2xl font-bold tabular-nums",
|
|
73
|
-
children:
|
|
81
|
+
children: b.filter((e) => e.type === "missed").length
|
|
74
82
|
}) })]
|
|
75
83
|
}),
|
|
76
84
|
/* @__PURE__ */ c(h, {
|
|
@@ -84,7 +92,7 @@ function y() {
|
|
|
84
92
|
}), /* @__PURE__ */ s(n, { className: "h-4 w-4 text-text-secondary" })]
|
|
85
93
|
}), /* @__PURE__ */ c(f, { children: [/* @__PURE__ */ s("div", {
|
|
86
94
|
className: "text-2xl font-bold tabular-nums",
|
|
87
|
-
children:
|
|
95
|
+
children: v(S)
|
|
88
96
|
}), /* @__PURE__ */ s("p", {
|
|
89
97
|
className: "text-xs text-text-secondary",
|
|
90
98
|
children: "minutes"
|
|
@@ -94,11 +102,11 @@ function y() {
|
|
|
94
102
|
}),
|
|
95
103
|
/* @__PURE__ */ c(d, { children: [/* @__PURE__ */ s(p, { children: /* @__PURE__ */ s(m, { children: "Call History" }) }), /* @__PURE__ */ s(f, {
|
|
96
104
|
className: "space-y-3",
|
|
97
|
-
children:
|
|
105
|
+
children: b.map((e) => /* @__PURE__ */ c("div", {
|
|
98
106
|
className: "flex items-center justify-between rounded border p-3",
|
|
99
107
|
children: [/* @__PURE__ */ c("div", {
|
|
100
108
|
className: "flex items-center gap-3",
|
|
101
|
-
children: [/* @__PURE__ */ s(
|
|
109
|
+
children: [/* @__PURE__ */ s(y, { type: e.type }), /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("p", {
|
|
102
110
|
className: "text-sm font-medium",
|
|
103
111
|
children: e.name
|
|
104
112
|
}), /* @__PURE__ */ s("p", {
|
|
@@ -131,6 +139,6 @@ function y() {
|
|
|
131
139
|
});
|
|
132
140
|
}
|
|
133
141
|
//#endregion
|
|
134
|
-
export {
|
|
142
|
+
export { b as CommunicationsCallsPagePage };
|
|
135
143
|
|
|
136
144
|
//# sourceMappingURL=CommunicationsCallsPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommunicationsCallsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/CommunicationsCallsPagePage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n} from '@burdenoff/fe-libs/ui';\nimport { Clock, Phone, PhoneIncoming, PhoneMissed, PhoneOutgoing } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\ntype CallType = 'incoming' | 'outgoing' | 'missed';\n\ntype CallRecord = {\n id: string;\n name: string;\n type: CallType;\n duration: string;\n time: string;\n topic: string;\n};\n\nconst formatDuration = (minutes: number): string => {\n const safeMinutes = Math.max(minutes, 0);\n const hours = Math.floor(safeMinutes / 60);\n const mins = safeMinutes % 60;\n if (hours > 0) {\n return `${String(hours).padStart(2, '0')}:${String(mins).padStart(2, '0')}`;\n }\n return `00:${String(mins).padStart(2, '0')}`;\n};\n\nconst CallIcon = ({ type }: { type: CallType }) => {\n if (type === 'incoming') return <PhoneIncoming className=\"h-4 w-4 text-status-success-text\" />;\n if (type === 'outgoing') return <PhoneOutgoing className=\"h-4 w-4 text-status-info-text\" />;\n return <PhoneMissed className=\"h-4 w-4 text-status-error-text\" />;\n};\n\nexport function CommunicationsCallsPagePage() {\n const { employees, teams } = useCrewFoundryStore();\n\n const callHistory = useMemo<CallRecord[]>(() => {\n const seed = employees.slice(0, 10);\n return seed.map((employee, index) => {\n const callType: CallType =\n index % 5 === 0 ? 'missed' : index % 2 === 0 ? 'outgoing' : 'incoming';\n const topicSource = teams[index % Math.max(teams.length, 1)];\n const durationMinutes = Math.round((employee.performanceScore + index) * 3);\n return {\n id: `call-${employee.id}`,\n name: `${employee.firstName} ${employee.lastName}`.trim(),\n type: callType,\n duration: callType === 'missed' ? '-' : formatDuration(durationMinutes),\n time: new Date(employee.startDate).toLocaleDateString(),\n topic: topicSource\n ? `${topicSource.name} check-in`\n : `${employee.department} operations update`,\n };\n });\n }, [employees, teams]);\n\n const connectedCalls = callHistory.filter((call) => call.duration !== '-');\n const averageMinutes = connectedCalls.length\n ? Math.round(\n connectedCalls\n .map((call) => {\n const [hours, minutes] = call.duration.split(':').map(Number);\n return hours * 60 + minutes;\n })\n .reduce((total, value) => total + value, 0) / connectedCalls.length\n )\n : 0;\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>Calls</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">Voice call history and quick dial</p>\n </div>\n <Button size=\"sm\">\n <Phone className=\"mr-1 h-4 w-4\" />\n New Call\n </Button>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-3\">\n <GlassCard treatment=\"
|
|
1
|
+
{"version":3,"file":"CommunicationsCallsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/CommunicationsCallsPagePage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { Clock, Phone, PhoneIncoming, PhoneMissed, PhoneOutgoing } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\ntype CallType = 'incoming' | 'outgoing' | 'missed';\n\ntype CallRecord = {\n id: string;\n name: string;\n type: CallType;\n duration: string;\n time: string;\n topic: string;\n};\n\nconst formatDuration = (minutes: number): string => {\n const safeMinutes = Math.max(minutes, 0);\n const hours = Math.floor(safeMinutes / 60);\n const mins = safeMinutes % 60;\n if (hours > 0) {\n return `${String(hours).padStart(2, '0')}:${String(mins).padStart(2, '0')}`;\n }\n return `00:${String(mins).padStart(2, '0')}`;\n};\n\nconst CallIcon = ({ type }: { type: CallType }) => {\n if (type === 'incoming') return <PhoneIncoming className=\"h-4 w-4 text-status-success-text\" />;\n if (type === 'outgoing') return <PhoneOutgoing className=\"h-4 w-4 text-status-info-text\" />;\n return <PhoneMissed className=\"h-4 w-4 text-status-error-text\" />;\n};\n\nexport function CommunicationsCallsPagePage() {\n const { employees, teams } = useCrewFoundryStore();\n\n const callHistory = useMemo<CallRecord[]>(() => {\n const seed = employees.slice(0, 10);\n return seed.map((employee, index) => {\n const callType: CallType =\n index % 5 === 0 ? 'missed' : index % 2 === 0 ? 'outgoing' : 'incoming';\n const topicSource = teams[index % Math.max(teams.length, 1)];\n const durationMinutes = Math.round((employee.performanceScore + index) * 3);\n return {\n id: `call-${employee.id}`,\n name: `${employee.firstName} ${employee.lastName}`.trim(),\n type: callType,\n duration: callType === 'missed' ? '-' : formatDuration(durationMinutes),\n time: new Date(employee.startDate).toLocaleDateString(),\n topic: topicSource\n ? `${topicSource.name} check-in`\n : `${employee.department} operations update`,\n };\n });\n }, [employees, teams]);\n\n const connectedCalls = callHistory.filter((call) => call.duration !== '-');\n const averageMinutes = connectedCalls.length\n ? Math.round(\n connectedCalls\n .map((call) => {\n const [hours, minutes] = call.duration.split(':').map(Number);\n return hours * 60 + minutes;\n })\n .reduce((total, value) => total + value, 0) / connectedCalls.length\n )\n : 0;\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>Calls</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">Voice call history and quick dial</p>\n <PagePurpose className=\"mt-1\">Review your call history and start new voice calls with colleagues — a quick way to reach teammates without leaving CrewFoundry.</PagePurpose>\n </div>\n <Button size=\"sm\">\n <Phone className=\"mr-1 h-4 w-4\" />\n New Call\n </Button>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-3\">\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Total Calls</CardTitle>\n <Phone className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{callHistory.length}</div>\n <p className=\"text-xs text-text-secondary\">Live call activity</p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Missed</CardTitle>\n <PhoneMissed className=\"h-4 w-4 text-status-error-text\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">\n {callHistory.filter((call) => call.type === 'missed').length}\n </div>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Avg Duration</CardTitle>\n <Clock className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{formatDuration(averageMinutes)}</div>\n <p className=\"text-xs text-text-secondary\">minutes</p>\n </CardContent>\n </GlassCard>\n </div>\n\n <Card>\n <CardHeader>\n <CardTitle>Call History</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {callHistory.map((call) => (\n <div key={call.id} className=\"flex items-center justify-between rounded border p-3\">\n <div className=\"flex items-center gap-3\">\n <CallIcon type={call.type} />\n <div>\n <p className=\"text-sm font-medium\">{call.name}</p>\n <p className=\"text-xs text-text-secondary\">{call.topic}</p>\n </div>\n </div>\n <div className=\"flex items-center gap-3\">\n <span className=\"text-xs text-text-secondary\">{call.time}</span>\n <Badge\n variant={call.type === 'missed' ? 'destructive' : 'outline'}\n className=\"text-[10px]\"\n >\n {call.duration === '-' ? 'missed' : call.duration}\n </Badge>\n <Button variant=\"outline\" size=\"sm\" className=\"h-7\">\n <Phone className=\"h-3 w-3\" />\n </Button>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;AA0BA,IAAM,KAAkB,MAA4B;CAClD,IAAM,IAAc,KAAK,IAAI,GAAS,EAAE,EAClC,IAAQ,KAAK,MAAM,IAAc,GAAG,EACpC,IAAO,IAAc;AAI3B,QAHI,IAAQ,IACH,GAAG,OAAO,EAAM,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,OAAO,EAAK,CAAC,SAAS,GAAG,IAAI,KAEpE,MAAM,OAAO,EAAK,CAAC,SAAS,GAAG,IAAI;GAGtC,KAAY,EAAE,cACd,MAAS,aAAmB,kBAAC,GAAD,EAAe,WAAU,oCAAqC,CAAA,GAC1F,MAAS,aAAmB,kBAAC,GAAD,EAAe,WAAU,iCAAkC,CAAA,GACpF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,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UAAW,gBAAwB,CAAA,EACxB,CAAA,EACb,kBAAC,GAAD;IAAa,WAAU;cACpB,EAAY,KAAK,MAChB,kBAAC,OAAD;KAAmB,WAAU;eAA7B,CACE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,GAAD,EAAU,MAAM,EAAK,MAAQ,CAAA,EAC7B,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;OAAG,WAAU;iBAAuB,EAAK;OAAS,CAAA,EAClD,kBAAC,KAAD;OAAG,WAAU;iBAA+B,EAAK;OAAU,CAAA,CACvD,EAAA,CAAA,CACF;SACN,kBAAC,OAAD;MAAK,WAAU;gBAAf;OACE,kBAAC,QAAD;QAAM,WAAU;kBAA+B,EAAK;QAAY,CAAA;OAChE,kBAAC,GAAD;QACE,SAAS,EAAK,SAAS,WAAW,gBAAgB;QAClD,WAAU;kBAET,EAAK,aAAa,MAAM,WAAW,EAAK;QACnC,CAAA;OACR,kBAAC,GAAD;QAAQ,SAAQ;QAAU,MAAK;QAAK,WAAU;kBAC5C,kBAAC,GAAD,EAAO,WAAU,WAAY,CAAA;QACtB,CAAA;OACL;QACF;OApBI,EAAK,GAoBT,CACN;IACU,CAAA,CACT,EAAA,CAAA;GACH"}
|
|
@@ -2,92 +2,110 @@ import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
|
2
2
|
import { useState as t } from "react";
|
|
3
3
|
import { Mail as n, MapPin as r, Phone as i, Search as a } from "lucide-react";
|
|
4
4
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
-
import { Badge as c,
|
|
5
|
+
import { Badge as c, CardContent as l, GlassCard as u, GradientText as d, IllustratedEmptyState as f, Input as p, PagePurpose as m } from "@burdenoff/fe-libs/ui";
|
|
6
6
|
//#region src/crewfoundry/pages/CommunicationsDirectoryPagePage.tsx
|
|
7
|
-
function
|
|
8
|
-
let { employees:
|
|
7
|
+
function h() {
|
|
8
|
+
let { employees: h } = e(), [g, _] = t(""), v = h.filter((e) => `${e.firstName} ${e.lastName} ${e.department} ${e.position} ${e.email}`.toLowerCase().includes(g.toLowerCase()));
|
|
9
9
|
return /* @__PURE__ */ s("div", {
|
|
10
10
|
className: "space-y-6 p-6",
|
|
11
11
|
children: [
|
|
12
|
-
/* @__PURE__ */ s("div", { children: [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
/* @__PURE__ */ s("div", { children: [
|
|
13
|
+
/* @__PURE__ */ o("h1", {
|
|
14
|
+
className: "text-2xl font-semibold",
|
|
15
|
+
children: /* @__PURE__ */ o(d, { children: "Company Directory" })
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ s("p", {
|
|
18
|
+
className: "text-sm text-text-secondary",
|
|
19
|
+
children: [h.length, " team members"]
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ o(m, {
|
|
22
|
+
className: "mt-1",
|
|
23
|
+
children: "Find anyone in the company by name, role, or department — use it to discover who to contact and how to reach them."
|
|
24
|
+
})
|
|
25
|
+
] }),
|
|
19
26
|
/* @__PURE__ */ s("div", {
|
|
20
27
|
className: "relative max-w-sm",
|
|
21
|
-
children: [/* @__PURE__ */ o(a, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ o(
|
|
28
|
+
children: [/* @__PURE__ */ o(a, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ o(p, {
|
|
22
29
|
placeholder: "Search by name, role, department...",
|
|
23
30
|
className: "pl-9",
|
|
24
|
-
value:
|
|
25
|
-
onChange: (e) =>
|
|
31
|
+
value: g,
|
|
32
|
+
onChange: (e) => _(e.target.value)
|
|
26
33
|
})]
|
|
27
34
|
}),
|
|
28
35
|
/* @__PURE__ */ o("div", {
|
|
29
36
|
className: "grid gap-3 md:grid-cols-2 lg:grid-cols-3",
|
|
30
|
-
children:
|
|
31
|
-
className: "
|
|
32
|
-
children: /* @__PURE__ */
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
className: "h-10 w-10 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-bold flex-shrink-0",
|
|
37
|
-
children: [e.firstName[0], e.lastName[0]]
|
|
38
|
-
}),
|
|
39
|
-
/* @__PURE__ */ s("div", {
|
|
40
|
-
className: "flex-1 min-w-0",
|
|
41
|
-
children: [
|
|
42
|
-
/* @__PURE__ */ s("p", {
|
|
43
|
-
className: "text-sm font-medium",
|
|
44
|
-
children: [
|
|
45
|
-
e.firstName,
|
|
46
|
-
" ",
|
|
47
|
-
e.lastName
|
|
48
|
-
]
|
|
49
|
-
}),
|
|
50
|
-
/* @__PURE__ */ o("p", {
|
|
51
|
-
className: "text-xs text-text-secondary",
|
|
52
|
-
children: e.position
|
|
53
|
-
}),
|
|
54
|
-
/* @__PURE__ */ o(c, {
|
|
55
|
-
variant: "outline",
|
|
56
|
-
className: "mt-1 text-[10px]",
|
|
57
|
-
children: e.department
|
|
58
|
-
}),
|
|
59
|
-
/* @__PURE__ */ s("div", {
|
|
60
|
-
className: "mt-2 space-y-1",
|
|
61
|
-
children: [
|
|
62
|
-
/* @__PURE__ */ s("p", {
|
|
63
|
-
className: "text-xs text-text-secondary flex items-center gap-1",
|
|
64
|
-
children: [/* @__PURE__ */ o(n, { className: "h-3 w-3" }), e.email]
|
|
65
|
-
}),
|
|
66
|
-
/* @__PURE__ */ s("p", {
|
|
67
|
-
className: "text-xs text-text-secondary flex items-center gap-1",
|
|
68
|
-
children: [/* @__PURE__ */ o(i, { className: "h-3 w-3" }), e.phone]
|
|
69
|
-
}),
|
|
70
|
-
/* @__PURE__ */ s("p", {
|
|
71
|
-
className: "text-xs text-text-secondary flex items-center gap-1",
|
|
72
|
-
children: [/* @__PURE__ */ o(r, { className: "h-3 w-3" }), e.location]
|
|
73
|
-
})
|
|
74
|
-
]
|
|
75
|
-
})
|
|
76
|
-
]
|
|
77
|
-
}),
|
|
78
|
-
/* @__PURE__ */ o(c, {
|
|
79
|
-
variant: e.status === "active" ? "default" : "secondary",
|
|
80
|
-
className: "text-[10px]",
|
|
81
|
-
children: e.status.replace("_", " ")
|
|
82
|
-
})
|
|
83
|
-
]
|
|
37
|
+
children: v.length === 0 ? /* @__PURE__ */ o("div", {
|
|
38
|
+
className: "col-span-full",
|
|
39
|
+
children: /* @__PURE__ */ o(f, {
|
|
40
|
+
illustration: "empty-people",
|
|
41
|
+
title: "No people found",
|
|
42
|
+
description: "Try a different search term to find a colleague."
|
|
84
43
|
})
|
|
85
|
-
})
|
|
44
|
+
}) : v.map((e, t) => /* @__PURE__ */ o(u, {
|
|
45
|
+
treatment: t === 0 ? "glass" : "plain",
|
|
46
|
+
glow: t === 0,
|
|
47
|
+
children: /* @__PURE__ */ o(l, {
|
|
48
|
+
className: "p-4",
|
|
49
|
+
children: /* @__PURE__ */ s("div", {
|
|
50
|
+
className: "flex items-start gap-3",
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ s("div", {
|
|
53
|
+
className: "h-10 w-10 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-bold flex-shrink-0",
|
|
54
|
+
children: [e.firstName[0], e.lastName[0]]
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ s("div", {
|
|
57
|
+
className: "flex-1 min-w-0",
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ s("p", {
|
|
60
|
+
className: "text-sm font-medium",
|
|
61
|
+
children: [
|
|
62
|
+
e.firstName,
|
|
63
|
+
" ",
|
|
64
|
+
e.lastName
|
|
65
|
+
]
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ o("p", {
|
|
68
|
+
className: "text-xs text-text-secondary",
|
|
69
|
+
children: e.position
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ o(c, {
|
|
72
|
+
variant: "outline",
|
|
73
|
+
className: "mt-1 text-[10px]",
|
|
74
|
+
children: e.department
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ s("div", {
|
|
77
|
+
className: "mt-2 space-y-1",
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ s("p", {
|
|
80
|
+
className: "text-xs text-text-secondary flex items-center gap-1",
|
|
81
|
+
children: [/* @__PURE__ */ o(n, { className: "h-3 w-3" }), e.email]
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ s("p", {
|
|
84
|
+
className: "text-xs text-text-secondary flex items-center gap-1",
|
|
85
|
+
children: [/* @__PURE__ */ o(i, { className: "h-3 w-3" }), e.phone]
|
|
86
|
+
}),
|
|
87
|
+
/* @__PURE__ */ s("p", {
|
|
88
|
+
className: "text-xs text-text-secondary flex items-center gap-1",
|
|
89
|
+
children: [/* @__PURE__ */ o(r, { className: "h-3 w-3" }), e.location]
|
|
90
|
+
})
|
|
91
|
+
]
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
}),
|
|
95
|
+
/* @__PURE__ */ o(c, {
|
|
96
|
+
variant: e.status === "active" ? "default" : "secondary",
|
|
97
|
+
className: "text-[10px]",
|
|
98
|
+
children: e.status.replace("_", " ")
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
}, e.id))
|
|
86
104
|
})
|
|
87
105
|
]
|
|
88
106
|
});
|
|
89
107
|
}
|
|
90
108
|
//#endregion
|
|
91
|
-
export {
|
|
109
|
+
export { h as CommunicationsDirectoryPagePage };
|
|
92
110
|
|
|
93
111
|
//# sourceMappingURL=CommunicationsDirectoryPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommunicationsDirectoryPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/CommunicationsDirectoryPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"CommunicationsDirectoryPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/CommunicationsDirectoryPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n Badge,\n CardContent,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { Mail, MapPin, Phone, Search } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function CommunicationsDirectoryPagePage() {\n const { employees } = useCrewFoundryStore();\n const [search, setSearch] = useState('');\n\n const filtered = employees.filter((e) =>\n `${e.firstName} ${e.lastName} ${e.department} ${e.position} ${e.email}`\n .toLowerCase()\n .includes(search.toLowerCase())\n );\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Company Directory</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">{employees.length} team members</p>\n <PagePurpose className=\"mt-1\">Find anyone in the company by name, role, or department — use it to discover who to contact and how to reach them.</PagePurpose>\n </div>\n <div className=\"relative max-w-sm\">\n <Search className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary\" />\n <Input\n placeholder=\"Search by name, role, department...\"\n className=\"pl-9\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n </div>\n <div className=\"grid gap-3 md:grid-cols-2 lg:grid-cols-3\">\n {filtered.length === 0 ? (\n <div className=\"col-span-full\">\n <IllustratedEmptyState illustration=\"empty-people\" title=\"No people found\" description=\"Try a different search term to find a colleague.\" />\n </div>\n ) : (\n filtered.map((emp, _idx) => (\n <GlassCard key={emp.id} treatment={_idx === 0 ? 'glass' : 'plain'} glow={_idx === 0}>\n <CardContent className=\"p-4\">\n <div className=\"flex items-start gap-3\">\n <div className=\"h-10 w-10 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-bold flex-shrink-0\">\n {emp.firstName[0]}\n {emp.lastName[0]}\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm font-medium\">\n {emp.firstName} {emp.lastName}\n </p>\n <p className=\"text-xs text-text-secondary\">{emp.position}</p>\n <Badge variant=\"outline\" className=\"mt-1 text-[10px]\">\n {emp.department}\n </Badge>\n <div className=\"mt-2 space-y-1\">\n <p className=\"text-xs text-text-secondary flex items-center gap-1\">\n <Mail className=\"h-3 w-3\" />\n {emp.email}\n </p>\n <p className=\"text-xs text-text-secondary flex items-center gap-1\">\n <Phone className=\"h-3 w-3\" />\n {emp.phone}\n </p>\n <p className=\"text-xs text-text-secondary flex items-center gap-1\">\n <MapPin className=\"h-3 w-3\" />\n {emp.location}\n </p>\n </div>\n </div>\n <Badge\n variant={emp.status === 'active' ? 'default' : 'secondary'}\n className=\"text-[10px]\"\n >\n {emp.status.replace('_', ' ')}\n </Badge>\n </div>\n </CardContent>\n </GlassCard>\n )))}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;AAaA,SAAgB,IAAkC;CAChD,IAAM,EAAE,iBAAc,GAAqB,EACrC,CAAC,GAAQ,KAAa,EAAS,GAAG,EAElC,IAAW,EAAU,QAAQ,MACjC,GAAG,EAAE,UAAU,GAAG,EAAE,SAAS,GAAG,EAAE,WAAW,GAAG,EAAE,SAAS,GAAG,EAAE,QAC7D,aAAa,CACb,SAAS,EAAO,aAAa,CAAC,CAClC;AAED,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD,EAAA,UAAA;IACE,kBAAC,MAAD;KAAI,WAAU;eACZ,kBAAC,GAAD,EAAA,UAAc,qBAAgC,CAAA;KAC3C,CAAA;IACL,kBAAC,KAAD;KAAG,WAAU;eAAb,CAA4C,EAAU,QAAO,gBAAiB;;IAC9E,kBAAC,GAAD;KAAa,WAAU;eAAO;KAAgI,CAAA;IAC1J,EAAA,CAAA;GACN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD,EAAQ,WAAU,wEAAyE,CAAA,EAC3F,kBAAC,GAAD;KACE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GAsCR,CACZ;IACE,CAAA;GACF"}
|
|
@@ -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 x() {
|
|
|
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
|