@mieweb/ui 0.1.0 → 0.1.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/LICENSE +39 -15
- package/README.md +9 -1
- package/dist/{chunk-CLNOI5J7.js → chunk-4SMSH4OY.js} +4 -4
- package/dist/chunk-4SMSH4OY.js.map +1 -0
- package/dist/chunk-5T3AWNHG.cjs +471 -0
- package/dist/chunk-5T3AWNHG.cjs.map +1 -0
- package/dist/chunk-74K3RRU7.cjs +4 -0
- package/dist/{chunk-ZO46CFVN.cjs.map → chunk-74K3RRU7.cjs.map} +1 -1
- package/dist/{chunk-VWXGUNBR.cjs → chunk-AKTUXJPI.cjs} +107 -18
- package/dist/chunk-AKTUXJPI.cjs.map +1 -0
- package/dist/{chunk-NH2JVQ6V.cjs → chunk-I7L6CQXR.cjs} +21 -9
- package/dist/chunk-I7L6CQXR.cjs.map +1 -0
- package/dist/{chunk-KJOFWJHV.js → chunk-MFB4FS7D.js} +120 -81
- package/dist/chunk-MFB4FS7D.js.map +1 -0
- package/dist/{chunk-LEE3NMNP.cjs → chunk-NL3CZNBH.cjs} +120 -81
- package/dist/chunk-NL3CZNBH.cjs.map +1 -0
- package/dist/{chunk-BR2XGATJ.cjs → chunk-NNEFAUHV.cjs} +4 -4
- package/dist/chunk-NNEFAUHV.cjs.map +1 -0
- package/dist/chunk-SCV7C55E.cjs +11 -0
- package/dist/chunk-SCV7C55E.cjs.map +1 -0
- package/dist/{chunk-D5IBXXF2.js → chunk-SD44QJIP.js} +20 -8
- package/dist/chunk-SD44QJIP.js.map +1 -0
- package/dist/{chunk-QBWVTJKF.js → chunk-UBRDKNLQ.js} +107 -18
- package/dist/chunk-UBRDKNLQ.js.map +1 -0
- package/dist/chunk-V2DF2GUE.js +3 -0
- package/dist/{chunk-ZQ4XMJH7.js.map → chunk-V2DF2GUE.js.map} +1 -1
- package/dist/chunk-VSQF22GL.js +9 -0
- package/dist/chunk-VSQF22GL.js.map +1 -0
- package/dist/chunk-XVZ4SLQB.js +447 -0
- package/dist/chunk-XVZ4SLQB.js.map +1 -0
- package/dist/components/AudioPlayer/index.cjs +6 -6
- package/dist/components/AudioPlayer/index.d.cts +5 -1
- package/dist/components/AudioPlayer/index.d.ts +5 -1
- package/dist/components/AudioPlayer/index.js +1 -1
- package/dist/components/Modal/index.cjs +11 -10
- package/dist/components/Modal/index.js +3 -2
- package/dist/components/RecordButton/index.cjs +4 -8
- package/dist/components/RecordButton/index.d.cts +57 -44
- package/dist/components/RecordButton/index.d.ts +57 -44
- package/dist/components/RecordButton/index.js +1 -1
- package/dist/components/Select/index.cjs +3 -4
- package/dist/components/Select/index.js +1 -2
- package/dist/components/Spinner/index.d.cts +1 -1
- package/dist/components/Spinner/index.d.ts +1 -1
- package/dist/hooks/index.cjs +3 -2
- package/dist/hooks/index.js +2 -1
- package/dist/index.cjs +880 -667
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -11
- package/dist/index.d.ts +16 -11
- package/dist/index.js +801 -588
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utils/index.cjs +6 -1
- package/dist/utils/index.d.cts +14 -1
- package/dist/utils/index.d.ts +14 -1
- package/dist/utils/index.js +2 -1
- package/package.json +7 -7
- package/dist/chunk-BR2XGATJ.cjs.map +0 -1
- package/dist/chunk-CLNOI5J7.js.map +0 -1
- package/dist/chunk-D5IBXXF2.js.map +0 -1
- package/dist/chunk-FQ5G7J24.js +0 -297
- package/dist/chunk-FQ5G7J24.js.map +0 -1
- package/dist/chunk-HLW3XD5R.cjs +0 -322
- package/dist/chunk-HLW3XD5R.cjs.map +0 -1
- package/dist/chunk-KJOFWJHV.js.map +0 -1
- package/dist/chunk-LEE3NMNP.cjs.map +0 -1
- package/dist/chunk-NH2JVQ6V.cjs.map +0 -1
- package/dist/chunk-QBWVTJKF.js.map +0 -1
- package/dist/chunk-VWXGUNBR.cjs.map +0 -1
- package/dist/chunk-ZO46CFVN.cjs +0 -4
- package/dist/chunk-ZQ4XMJH7.js +0 -3
package/dist/index.js
CHANGED
|
@@ -10,8 +10,8 @@ export { createBrandPreset, generateBrandCSS, generateTailwindTheme } from './ch
|
|
|
10
10
|
export { bluehiveBrand } from './chunk-ULOA7WBW.js';
|
|
11
11
|
export { defaultBrand } from './chunk-4LTN2LEN.js';
|
|
12
12
|
export { enterpriseHealthBrand } from './chunk-MTZPVOP6.js';
|
|
13
|
-
import { Select } from './chunk-
|
|
14
|
-
export { Select, selectTriggerVariants } from './chunk-
|
|
13
|
+
import { Select } from './chunk-MFB4FS7D.js';
|
|
14
|
+
export { Select, selectTriggerVariants } from './chunk-MFB4FS7D.js';
|
|
15
15
|
export { Skeleton, SkeletonCard, SkeletonTable, SkeletonText, skeletonVariants } from './chunk-6OCIIIAI.js';
|
|
16
16
|
import { Spinner, SpinnerWithLabel } from './chunk-GV5JQBPX.js';
|
|
17
17
|
export { FullPageSpinner, Spinner, SpinnerWithLabel, spinnerVariants } from './chunk-GV5JQBPX.js';
|
|
@@ -25,8 +25,8 @@ import { Text } from './chunk-RCMF6KZA.js';
|
|
|
25
25
|
export { SmallMuted, Text, textVariants } from './chunk-RCMF6KZA.js';
|
|
26
26
|
import { Textarea } from './chunk-4AWW5WPF.js';
|
|
27
27
|
export { Textarea, textareaVariants } from './chunk-4AWW5WPF.js';
|
|
28
|
-
import { Modal, ModalHeader, ModalTitle, ModalBody, ModalFooter, ModalClose } from './chunk-
|
|
29
|
-
export { Modal, ModalBody, ModalClose, ModalFooter, ModalHeader, ModalTitle, modalContentVariants, modalOverlayVariants } from './chunk-
|
|
28
|
+
import { Modal, ModalHeader, ModalTitle, ModalBody, ModalFooter, ModalClose } from './chunk-SD44QJIP.js';
|
|
29
|
+
export { Modal, ModalBody, ModalClose, ModalFooter, ModalHeader, ModalTitle, modalContentVariants, modalOverlayVariants } from './chunk-SD44QJIP.js';
|
|
30
30
|
export { Pagination, SimplePagination, paginationButtonVariants } from './chunk-ONWOB76P.js';
|
|
31
31
|
export { PhoneInput, PhoneInputGroup } from './chunk-4YRAEFYW.js';
|
|
32
32
|
import { Progress } from './chunk-4MHTSFPX.js';
|
|
@@ -34,12 +34,12 @@ export { CircularProgress, Progress, circularProgressVariants, progressBarFillVa
|
|
|
34
34
|
export { QuickAction, QuickActionGroup, QuickActionIcons, quickActionIconVariants, quickActionVariants } from './chunk-6Q4SU72T.js';
|
|
35
35
|
import { Radio } from './chunk-OW2BWGST.js';
|
|
36
36
|
export { Radio, RadioGroup, radioVariants } from './chunk-OW2BWGST.js';
|
|
37
|
-
export { RecordButton, formatDuration, recordButtonVariants
|
|
37
|
+
export { RecordButton, formatDuration, recordButtonVariants } from './chunk-XVZ4SLQB.js';
|
|
38
38
|
export { DateButton, DatePicker, RadioOption, SchedulePicker, TimeButton, TimePicker, dateButtonVariants, radioOptionVariants, timeButtonVariants } from './chunk-DMA74PZ7.js';
|
|
39
39
|
import { Badge } from './chunk-3NJ72QU6.js';
|
|
40
40
|
export { Badge, badgeVariants } from './chunk-3NJ72QU6.js';
|
|
41
41
|
export { Breadcrumb, BreadcrumbSlash } from './chunk-B3L43JGH.js';
|
|
42
|
-
import { Button } from './chunk-N5EKL4DH.js';
|
|
42
|
+
import { Button, buttonVariants } from './chunk-N5EKL4DH.js';
|
|
43
43
|
export { Button, buttonVariants } from './chunk-N5EKL4DH.js';
|
|
44
44
|
import { Card, CardHeader, CardTitle, CardContent } from './chunk-XXOBTAKA.js';
|
|
45
45
|
export { Card, CardActions, CardBadge, CardCollapsible, CardContent, CardDescription, CardDivider, CardFooter, CardHeader, CardMedia, CardStat, CardTitle, cardAccentVariants, cardVariants } from './chunk-XXOBTAKA.js';
|
|
@@ -54,19 +54,20 @@ import { useCommandK, useIsMobile, useMediaQuery } from './chunk-CP7NPDQW.js';
|
|
|
54
54
|
export { useCommandK, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardShortcut, useMediaQuery } from './chunk-CP7NPDQW.js';
|
|
55
55
|
export { useTheme } from './chunk-KJZNEVYM.js';
|
|
56
56
|
export { usePrefersReducedMotion } from './chunk-HB7C7NB5.js';
|
|
57
|
-
import { useFocusTrap } from './chunk-
|
|
58
|
-
export { useFocusTrap } from './chunk-
|
|
57
|
+
import { useFocusTrap } from './chunk-4SMSH4OY.js';
|
|
58
|
+
export { useFocusTrap } from './chunk-4SMSH4OY.js';
|
|
59
59
|
import { useClickOutside } from './chunk-OT36EMM5.js';
|
|
60
60
|
export { useClickOutside } from './chunk-OT36EMM5.js';
|
|
61
61
|
import { useEscapeKey } from './chunk-T4ME7QCT.js';
|
|
62
62
|
export { useEscapeKey } from './chunk-T4ME7QCT.js';
|
|
63
|
-
import './chunk-
|
|
63
|
+
import './chunk-V2DF2GUE.js';
|
|
64
64
|
export { formatPhoneNumber, isPhoneNumberEmpty, isValidPhoneNumber, unformatPhoneNumber } from './chunk-CEHWXAAI.js';
|
|
65
65
|
export { calculateAge, formatDateValue, isDateEmpty, isDateInFuture, isDateInPast, isValidDate, isValidDrivingAge, parseDateValue } from './chunk-SN52QMRT.js';
|
|
66
|
+
export { isStorybookDocsMode } from './chunk-VSQF22GL.js';
|
|
66
67
|
export { miewebUIPreset, miewebUISafelist } from './chunk-O7WRE2WX.js';
|
|
67
68
|
import { Alert, AlertTitle, AlertDescription } from './chunk-B26RIQ5R.js';
|
|
68
69
|
export { Alert, AlertDescription, AlertTitle, alertVariants } from './chunk-B26RIQ5R.js';
|
|
69
|
-
export { AudioPlayer, ProgressBar, audioPlayerVariants, formatTime as formatAudioTime, playButtonVariants } from './chunk-
|
|
70
|
+
export { AudioPlayer, ProgressBar, audioPlayerVariants, formatTime as formatAudioTime, playButtonVariants } from './chunk-UBRDKNLQ.js';
|
|
70
71
|
export { AudioRecorder, audioRecorderVariants, controlButtonVariants, formatTime, waveformContainerVariants } from './chunk-QZLRB3UG.js';
|
|
71
72
|
import { Avatar } from './chunk-NIHESA7O.js';
|
|
72
73
|
export { Avatar, AvatarGroup, avatarVariants, getInitials } from './chunk-NIHESA7O.js';
|
|
@@ -7839,6 +7840,8 @@ function CheckrIntegration({
|
|
|
7839
7840
|
onDisconnect,
|
|
7840
7841
|
onInviteCandidate,
|
|
7841
7842
|
onViewReport,
|
|
7843
|
+
onViewSelected,
|
|
7844
|
+
onExportSelected,
|
|
7842
7845
|
onRefresh,
|
|
7843
7846
|
loading = false,
|
|
7844
7847
|
error,
|
|
@@ -7865,7 +7868,10 @@ function CheckrIntegration({
|
|
|
7865
7868
|
phone = "Phone",
|
|
7866
7869
|
package: packageLabel = "Package",
|
|
7867
7870
|
submit = "Send Invitation",
|
|
7868
|
-
cancel = "Cancel"
|
|
7871
|
+
cancel = "Cancel",
|
|
7872
|
+
exportSelected = "Export Selected",
|
|
7873
|
+
viewDetails = "View Details",
|
|
7874
|
+
noReportsSelected = "No reports selected"
|
|
7869
7875
|
} = labels;
|
|
7870
7876
|
const [showInviteModal, setShowInviteModal] = React46.useState(false);
|
|
7871
7877
|
const [candidateName, setCandidateName] = React46.useState("");
|
|
@@ -7874,6 +7880,12 @@ function CheckrIntegration({
|
|
|
7874
7880
|
const [selectedPackage, setSelectedPackage] = React46.useState(
|
|
7875
7881
|
packages[0]?.id || ""
|
|
7876
7882
|
);
|
|
7883
|
+
const [selectedReports, setSelectedReports] = React46.useState(
|
|
7884
|
+
/* @__PURE__ */ new Set()
|
|
7885
|
+
);
|
|
7886
|
+
React46.useEffect(() => {
|
|
7887
|
+
setSelectedReports(/* @__PURE__ */ new Set());
|
|
7888
|
+
}, [reports, connected]);
|
|
7877
7889
|
const statusLabels = {
|
|
7878
7890
|
pending,
|
|
7879
7891
|
running,
|
|
@@ -7886,18 +7898,44 @@ function CheckrIntegration({
|
|
|
7886
7898
|
consider,
|
|
7887
7899
|
adverse_action: adverseAction
|
|
7888
7900
|
};
|
|
7889
|
-
const
|
|
7890
|
-
pending: "
|
|
7891
|
-
running: "
|
|
7892
|
-
complete: "
|
|
7893
|
-
failed: "
|
|
7894
|
-
expired: "
|
|
7895
|
-
};
|
|
7896
|
-
const
|
|
7897
|
-
clear: "text-
|
|
7898
|
-
consider: "text-
|
|
7899
|
-
adverse_action: "text-
|
|
7900
|
-
};
|
|
7901
|
+
const statusStyles = {
|
|
7902
|
+
pending: "border-warning text-warning bg-warning/10",
|
|
7903
|
+
running: "border-warning text-warning bg-warning/10",
|
|
7904
|
+
complete: "border-success text-success bg-success/10",
|
|
7905
|
+
failed: "border-destructive text-destructive bg-destructive/10",
|
|
7906
|
+
expired: "border-muted-foreground text-muted-foreground bg-muted"
|
|
7907
|
+
};
|
|
7908
|
+
const resultStyles = {
|
|
7909
|
+
clear: "text-success",
|
|
7910
|
+
consider: "text-warning",
|
|
7911
|
+
adverse_action: "text-destructive"
|
|
7912
|
+
};
|
|
7913
|
+
const statusDotColors = {
|
|
7914
|
+
pending: "bg-warning",
|
|
7915
|
+
running: "bg-warning",
|
|
7916
|
+
complete: "bg-success",
|
|
7917
|
+
failed: "bg-destructive",
|
|
7918
|
+
expired: "bg-muted-foreground"
|
|
7919
|
+
};
|
|
7920
|
+
const statusCounts = React46.useMemo(() => {
|
|
7921
|
+
const counts = {
|
|
7922
|
+
pending: 0,
|
|
7923
|
+
running: 0,
|
|
7924
|
+
complete: 0,
|
|
7925
|
+
failed: 0,
|
|
7926
|
+
expired: 0
|
|
7927
|
+
};
|
|
7928
|
+
reports.forEach((report) => {
|
|
7929
|
+
if (counts[report.status] !== void 0) {
|
|
7930
|
+
counts[report.status]++;
|
|
7931
|
+
}
|
|
7932
|
+
});
|
|
7933
|
+
return counts;
|
|
7934
|
+
}, [reports]);
|
|
7935
|
+
const packageOptions = packages.map((pkg) => ({
|
|
7936
|
+
value: pkg.id,
|
|
7937
|
+
label: pkg.name
|
|
7938
|
+
}));
|
|
7901
7939
|
const handleInviteSubmit = (e) => {
|
|
7902
7940
|
e.preventDefault();
|
|
7903
7941
|
if (candidateName && candidateEmail && selectedPackage) {
|
|
@@ -7915,6 +7953,29 @@ function CheckrIntegration({
|
|
|
7915
7953
|
setCandidatePhone("");
|
|
7916
7954
|
}
|
|
7917
7955
|
};
|
|
7956
|
+
const handleToggleReport = (reportId) => {
|
|
7957
|
+
setSelectedReports((prev) => {
|
|
7958
|
+
const next = new Set(prev);
|
|
7959
|
+
if (next.has(reportId)) {
|
|
7960
|
+
next.delete(reportId);
|
|
7961
|
+
} else {
|
|
7962
|
+
next.add(reportId);
|
|
7963
|
+
}
|
|
7964
|
+
return next;
|
|
7965
|
+
});
|
|
7966
|
+
};
|
|
7967
|
+
const handleViewSelected = () => {
|
|
7968
|
+
const selected = reports.filter((r) => selectedReports.has(r.id));
|
|
7969
|
+
if (onViewSelected) {
|
|
7970
|
+
onViewSelected(selected);
|
|
7971
|
+
} else if (selected.length === 1 && onViewReport) {
|
|
7972
|
+
onViewReport(selected[0]);
|
|
7973
|
+
}
|
|
7974
|
+
};
|
|
7975
|
+
const handleExportSelected = () => {
|
|
7976
|
+
const selected = reports.filter((r) => selectedReports.has(r.id));
|
|
7977
|
+
onExportSelected?.(selected);
|
|
7978
|
+
};
|
|
7918
7979
|
const formatDate4 = (date) => {
|
|
7919
7980
|
if (!date) return "";
|
|
7920
7981
|
const d = typeof date === "string" ? new Date(date) : date;
|
|
@@ -7923,9 +7984,26 @@ function CheckrIntegration({
|
|
|
7923
7984
|
return /* @__PURE__ */ jsxs("div", { className: cn("checkr-integration", className), children: [
|
|
7924
7985
|
/* @__PURE__ */ jsxs("div", { className: "mb-6 flex items-center justify-between", children: [
|
|
7925
7986
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
7926
|
-
/* @__PURE__ */ jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-lg
|
|
7987
|
+
/* @__PURE__ */ jsx("div", { className: "bg-success/10 flex h-12 w-12 items-center justify-center rounded-lg", children: /* @__PURE__ */ jsx(
|
|
7988
|
+
"svg",
|
|
7989
|
+
{
|
|
7990
|
+
className: "text-success h-6 w-6",
|
|
7991
|
+
fill: "none",
|
|
7992
|
+
viewBox: "0 0 24 24",
|
|
7993
|
+
stroke: "currentColor",
|
|
7994
|
+
strokeWidth: 2,
|
|
7995
|
+
children: /* @__PURE__ */ jsx(
|
|
7996
|
+
"path",
|
|
7997
|
+
{
|
|
7998
|
+
strokeLinecap: "round",
|
|
7999
|
+
strokeLinejoin: "round",
|
|
8000
|
+
d: "M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"
|
|
8001
|
+
}
|
|
8002
|
+
)
|
|
8003
|
+
}
|
|
8004
|
+
) }),
|
|
7927
8005
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
7928
|
-
/* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold", children: "Checkr" }),
|
|
8006
|
+
/* @__PURE__ */ jsx("h3", { className: "text-foreground text-lg font-semibold", children: "Checkr" }),
|
|
7929
8007
|
connected && account?.name && /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-sm", children: [
|
|
7930
8008
|
account.name,
|
|
7931
8009
|
account.plan && /* @__PURE__ */ jsxs("span", { className: "ml-2 text-xs", children: [
|
|
@@ -7936,78 +8014,164 @@ function CheckrIntegration({
|
|
|
7936
8014
|
] })
|
|
7937
8015
|
] })
|
|
7938
8016
|
] }),
|
|
7939
|
-
connected ? /* @__PURE__ */ jsx(
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
8017
|
+
connected ? /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: onDisconnect, children: disconnect }) : /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: onConnect, children: [
|
|
8018
|
+
/* @__PURE__ */ jsx(
|
|
8019
|
+
"svg",
|
|
8020
|
+
{
|
|
8021
|
+
className: "mr-2 h-4 w-4",
|
|
8022
|
+
fill: "none",
|
|
8023
|
+
viewBox: "0 0 24 24",
|
|
8024
|
+
stroke: "currentColor",
|
|
8025
|
+
strokeWidth: 2,
|
|
8026
|
+
children: /* @__PURE__ */ jsx(
|
|
8027
|
+
"path",
|
|
8028
|
+
{
|
|
8029
|
+
strokeLinecap: "round",
|
|
8030
|
+
strokeLinejoin: "round",
|
|
8031
|
+
d: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"
|
|
8032
|
+
}
|
|
8033
|
+
)
|
|
8034
|
+
}
|
|
8035
|
+
),
|
|
8036
|
+
connect
|
|
8037
|
+
] })
|
|
8038
|
+
] }),
|
|
8039
|
+
error && /* @__PURE__ */ jsxs("div", { className: "bg-destructive/10 border-destructive/20 text-destructive mb-4 rounded-lg border p-4", children: [
|
|
8040
|
+
/* @__PURE__ */ jsx(
|
|
8041
|
+
"svg",
|
|
7949
8042
|
{
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
8043
|
+
className: "mr-2 inline-block h-4 w-4",
|
|
8044
|
+
fill: "none",
|
|
8045
|
+
viewBox: "0 0 24 24",
|
|
8046
|
+
stroke: "currentColor",
|
|
8047
|
+
strokeWidth: 2,
|
|
8048
|
+
children: /* @__PURE__ */ jsx(
|
|
8049
|
+
"path",
|
|
8050
|
+
{
|
|
8051
|
+
strokeLinecap: "round",
|
|
8052
|
+
strokeLinejoin: "round",
|
|
8053
|
+
d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
8054
|
+
}
|
|
8055
|
+
)
|
|
7957
8056
|
}
|
|
7958
|
-
)
|
|
7959
|
-
] }),
|
|
7960
|
-
error && /* @__PURE__ */ jsxs("div", { className: "mb-4 rounded-lg border border-red-200 bg-red-50 p-4 text-red-600", children: [
|
|
7961
|
-
/* @__PURE__ */ jsx("i", { className: "fas fa-exclamation-circle mr-2" }),
|
|
8057
|
+
),
|
|
7962
8058
|
error
|
|
7963
8059
|
] }),
|
|
7964
8060
|
connected && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7965
|
-
/* @__PURE__ */
|
|
7966
|
-
/* @__PURE__ */
|
|
7967
|
-
"
|
|
8061
|
+
reports.length > 0 && /* @__PURE__ */ jsx("div", { className: "text-muted-foreground mb-4 flex flex-wrap items-center gap-4 text-sm", children: Object.entries(statusCounts).filter(([, count]) => count > 0).map(([status, count]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
8062
|
+
/* @__PURE__ */ jsx(
|
|
8063
|
+
"span",
|
|
7968
8064
|
{
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
/* @__PURE__ */ jsx("i", { className: "fas fa-user-plus mr-2" }),
|
|
7974
|
-
inviteCandidate
|
|
7975
|
-
]
|
|
8065
|
+
className: cn(
|
|
8066
|
+
"h-2.5 w-2.5 rounded-full",
|
|
8067
|
+
statusDotColors[status]
|
|
8068
|
+
)
|
|
7976
8069
|
}
|
|
7977
8070
|
),
|
|
7978
|
-
/* @__PURE__ */ jsxs(
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
|
|
7986
|
-
|
|
7987
|
-
|
|
7988
|
-
|
|
7989
|
-
|
|
8071
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
8072
|
+
count,
|
|
8073
|
+
" ",
|
|
8074
|
+
statusLabels[status]?.toLowerCase()
|
|
8075
|
+
] })
|
|
8076
|
+
] }, status)) }),
|
|
8077
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-6 flex flex-wrap gap-3", children: [
|
|
8078
|
+
/* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: () => setShowInviteModal(true), children: [
|
|
8079
|
+
/* @__PURE__ */ jsx(
|
|
8080
|
+
"svg",
|
|
8081
|
+
{
|
|
8082
|
+
className: "mr-2 h-4 w-4",
|
|
8083
|
+
fill: "none",
|
|
8084
|
+
viewBox: "0 0 24 24",
|
|
8085
|
+
stroke: "currentColor",
|
|
8086
|
+
strokeWidth: 2,
|
|
8087
|
+
children: /* @__PURE__ */ jsx(
|
|
8088
|
+
"path",
|
|
8089
|
+
{
|
|
8090
|
+
strokeLinecap: "round",
|
|
8091
|
+
strokeLinejoin: "round",
|
|
8092
|
+
d: "M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z"
|
|
8093
|
+
}
|
|
8094
|
+
)
|
|
8095
|
+
}
|
|
8096
|
+
),
|
|
8097
|
+
inviteCandidate
|
|
8098
|
+
] }),
|
|
8099
|
+
/* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: onRefresh, children: [
|
|
8100
|
+
/* @__PURE__ */ jsx(
|
|
8101
|
+
"svg",
|
|
8102
|
+
{
|
|
8103
|
+
className: "mr-2 h-4 w-4",
|
|
8104
|
+
fill: "none",
|
|
8105
|
+
viewBox: "0 0 24 24",
|
|
8106
|
+
stroke: "currentColor",
|
|
8107
|
+
strokeWidth: 2,
|
|
8108
|
+
children: /* @__PURE__ */ jsx(
|
|
8109
|
+
"path",
|
|
8110
|
+
{
|
|
8111
|
+
strokeLinecap: "round",
|
|
8112
|
+
strokeLinejoin: "round",
|
|
8113
|
+
d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
|
|
8114
|
+
}
|
|
8115
|
+
)
|
|
8116
|
+
}
|
|
8117
|
+
),
|
|
8118
|
+
refresh
|
|
8119
|
+
] })
|
|
7990
8120
|
] }),
|
|
7991
|
-
/* @__PURE__ */ jsxs("div", { className: "rounded-lg border", children: [
|
|
7992
|
-
/* @__PURE__ */ jsx("div", { className: "border-
|
|
7993
|
-
loading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ jsx("div", { className: "border-primary h-8 w-8 animate-spin rounded-full border-4 border-t-transparent" }) }) : reports.length > 0 ? /* @__PURE__ */
|
|
7994
|
-
"div",
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
/* @__PURE__ */
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8121
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-card border-border overflow-hidden rounded-lg border", children: [
|
|
8122
|
+
/* @__PURE__ */ jsx("div", { className: "border-border border-b px-4 py-3", children: /* @__PURE__ */ jsx("h4", { className: "text-card-foreground font-medium", children: viewReports }) }),
|
|
8123
|
+
loading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ jsx("div", { className: "border-primary h-8 w-8 animate-spin rounded-full border-4 border-t-transparent" }) }) : reports.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8124
|
+
/* @__PURE__ */ jsx("div", { className: "divide-border divide-y", children: reports.map((report) => /* @__PURE__ */ jsxs(
|
|
8125
|
+
"div",
|
|
8126
|
+
{
|
|
8127
|
+
className: "hover:bg-muted/50 flex items-center justify-between px-4 py-4 transition-colors",
|
|
8128
|
+
children: [
|
|
8129
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
8130
|
+
/* @__PURE__ */ jsx(
|
|
8131
|
+
"button",
|
|
8132
|
+
{
|
|
8133
|
+
type: "button",
|
|
8134
|
+
onClick: () => handleToggleReport(report.id),
|
|
8135
|
+
className: cn(
|
|
8136
|
+
"flex h-5 w-5 shrink-0 items-center justify-center rounded border-2 transition-colors",
|
|
8137
|
+
selectedReports.has(report.id) ? "border-primary bg-primary" : "border-muted-foreground/40 hover:border-muted-foreground"
|
|
8138
|
+
),
|
|
8139
|
+
"aria-label": `Select ${report.candidate.name}`,
|
|
8140
|
+
"aria-checked": selectedReports.has(report.id),
|
|
8141
|
+
role: "checkbox",
|
|
8142
|
+
children: selectedReports.has(report.id) && /* @__PURE__ */ jsx(
|
|
8143
|
+
"svg",
|
|
8144
|
+
{
|
|
8145
|
+
className: "text-primary-foreground h-3 w-3",
|
|
8146
|
+
fill: "none",
|
|
8147
|
+
viewBox: "0 0 24 24",
|
|
8148
|
+
stroke: "currentColor",
|
|
8149
|
+
strokeWidth: 3,
|
|
8150
|
+
children: /* @__PURE__ */ jsx(
|
|
8151
|
+
"path",
|
|
8152
|
+
{
|
|
8153
|
+
strokeLinecap: "round",
|
|
8154
|
+
strokeLinejoin: "round",
|
|
8155
|
+
d: "M5 13l4 4L19 7"
|
|
8156
|
+
}
|
|
8157
|
+
)
|
|
8158
|
+
}
|
|
8159
|
+
)
|
|
8160
|
+
}
|
|
8161
|
+
),
|
|
8162
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
8163
|
+
/* @__PURE__ */ jsx("p", { className: "text-card-foreground font-medium", children: report.candidate.name }),
|
|
8164
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: report.candidate.email }),
|
|
8165
|
+
report.packageName && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: report.packageName })
|
|
8166
|
+
] })
|
|
8167
|
+
] }),
|
|
8004
8168
|
/* @__PURE__ */ jsxs("div", { className: "text-right", children: [
|
|
8005
8169
|
/* @__PURE__ */ jsx(
|
|
8006
8170
|
"span",
|
|
8007
8171
|
{
|
|
8008
8172
|
className: cn(
|
|
8009
|
-
"inline-block rounded-full px-
|
|
8010
|
-
|
|
8173
|
+
"inline-block rounded-full border px-3 py-0.5 text-xs font-medium",
|
|
8174
|
+
statusStyles[report.status]
|
|
8011
8175
|
),
|
|
8012
8176
|
children: statusLabels[report.status] || report.status
|
|
8013
8177
|
}
|
|
@@ -8017,136 +8181,163 @@ function CheckrIntegration({
|
|
|
8017
8181
|
{
|
|
8018
8182
|
className: cn(
|
|
8019
8183
|
"mt-1 text-sm font-medium",
|
|
8020
|
-
|
|
8184
|
+
resultStyles[report.result]
|
|
8021
8185
|
),
|
|
8022
8186
|
children: resultLabels[report.result] || report.result
|
|
8023
8187
|
}
|
|
8024
8188
|
),
|
|
8025
|
-
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: formatDate4(report.completedAt || report.createdAt) })
|
|
8026
|
-
] })
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
children: /* @__PURE__ */ jsx("i", { className: "fas fa-external-link-alt text-gray-600" })
|
|
8035
|
-
}
|
|
8036
|
-
)
|
|
8037
|
-
] })
|
|
8038
|
-
]
|
|
8039
|
-
},
|
|
8040
|
-
report.id
|
|
8041
|
-
)) }) : /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground py-8 text-center", children: [
|
|
8042
|
-
/* @__PURE__ */ jsx("i", { className: "fas fa-clipboard-list mb-2 text-3xl text-gray-300" }),
|
|
8043
|
-
/* @__PURE__ */ jsx("p", { children: noReports })
|
|
8044
|
-
] })
|
|
8045
|
-
] })
|
|
8046
|
-
] }),
|
|
8047
|
-
!connected && !error && /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-dashed p-8 text-center", children: [
|
|
8048
|
-
/* @__PURE__ */ jsx("i", { className: "fas fa-link-slash mb-4 text-4xl text-gray-300" }),
|
|
8049
|
-
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-4", children: "Connect your Checkr account to run background checks on candidates" }),
|
|
8050
|
-
/* @__PURE__ */ jsxs(
|
|
8051
|
-
"button",
|
|
8052
|
-
{
|
|
8053
|
-
type: "button",
|
|
8054
|
-
onClick: onConnect,
|
|
8055
|
-
className: "rounded-lg bg-emerald-600 px-6 py-2 text-white hover:bg-emerald-700",
|
|
8056
|
-
children: [
|
|
8057
|
-
/* @__PURE__ */ jsx("i", { className: "fas fa-link mr-2" }),
|
|
8058
|
-
connect
|
|
8059
|
-
]
|
|
8060
|
-
}
|
|
8061
|
-
)
|
|
8062
|
-
] }),
|
|
8063
|
-
showInviteModal && /* @__PURE__ */ jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
|
|
8064
|
-
/* @__PURE__ */ jsx(
|
|
8065
|
-
"div",
|
|
8066
|
-
{
|
|
8067
|
-
role: "button",
|
|
8068
|
-
tabIndex: 0,
|
|
8069
|
-
"aria-label": "Close modal",
|
|
8070
|
-
className: "fixed inset-0 bg-black/50",
|
|
8071
|
-
onClick: () => setShowInviteModal(false),
|
|
8072
|
-
onKeyDown: (e) => e.key === "Enter" && setShowInviteModal(false)
|
|
8073
|
-
}
|
|
8074
|
-
),
|
|
8075
|
-
/* @__PURE__ */ jsxs("div", { className: "relative z-10 w-full max-w-md rounded-xl bg-white p-6 shadow-xl", children: [
|
|
8076
|
-
/* @__PURE__ */ jsx("h3", { className: "mb-4 text-lg font-semibold", children: inviteCandidate }),
|
|
8077
|
-
/* @__PURE__ */ jsxs("form", { onSubmit: handleInviteSubmit, children: [
|
|
8078
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
8079
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
8080
|
-
/* @__PURE__ */ jsx("label", { className: "mb-1 block text-sm font-medium", children: name }),
|
|
8081
|
-
/* @__PURE__ */ jsx(
|
|
8082
|
-
"input",
|
|
8083
|
-
{
|
|
8084
|
-
type: "text",
|
|
8085
|
-
value: candidateName,
|
|
8086
|
-
onChange: (e) => setCandidateName(e.target.value),
|
|
8087
|
-
className: "w-full rounded-lg border border-gray-300 px-3 py-2",
|
|
8088
|
-
required: true
|
|
8089
|
-
}
|
|
8090
|
-
)
|
|
8091
|
-
] }),
|
|
8092
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
8093
|
-
/* @__PURE__ */ jsx("label", { className: "mb-1 block text-sm font-medium", children: email }),
|
|
8189
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-1 text-xs", children: formatDate4(report.completedAt || report.createdAt) })
|
|
8190
|
+
] })
|
|
8191
|
+
]
|
|
8192
|
+
},
|
|
8193
|
+
report.id
|
|
8194
|
+
)) }),
|
|
8195
|
+
/* @__PURE__ */ jsxs("div", { className: "border-border bg-muted/30 flex items-center justify-between border-t px-4 py-3", children: [
|
|
8196
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-sm", children: selectedReports.size > 0 ? `${selectedReports.size} report${selectedReports.size > 1 ? "s" : ""} selected` : noReportsSelected }),
|
|
8197
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
8094
8198
|
/* @__PURE__ */ jsx(
|
|
8095
|
-
|
|
8199
|
+
Button,
|
|
8096
8200
|
{
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8201
|
+
variant: "outline",
|
|
8202
|
+
size: "sm",
|
|
8203
|
+
onClick: handleExportSelected,
|
|
8204
|
+
disabled: selectedReports.size === 0,
|
|
8205
|
+
children: exportSelected
|
|
8102
8206
|
}
|
|
8103
|
-
)
|
|
8104
|
-
] }),
|
|
8105
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
8106
|
-
/* @__PURE__ */ jsx("label", { className: "mb-1 block text-sm font-medium", children: phone }),
|
|
8207
|
+
),
|
|
8107
8208
|
/* @__PURE__ */ jsx(
|
|
8108
|
-
|
|
8209
|
+
Button,
|
|
8109
8210
|
{
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8211
|
+
variant: "primary",
|
|
8212
|
+
size: "sm",
|
|
8213
|
+
onClick: handleViewSelected,
|
|
8214
|
+
disabled: selectedReports.size === 0,
|
|
8215
|
+
children: viewDetails
|
|
8114
8216
|
}
|
|
8115
8217
|
)
|
|
8116
|
-
] })
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8218
|
+
] })
|
|
8219
|
+
] })
|
|
8220
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground py-8 text-center", children: [
|
|
8221
|
+
/* @__PURE__ */ jsx(
|
|
8222
|
+
"svg",
|
|
8223
|
+
{
|
|
8224
|
+
className: "text-muted-foreground/30 mx-auto mb-2 h-12 w-12",
|
|
8225
|
+
fill: "none",
|
|
8226
|
+
viewBox: "0 0 24 24",
|
|
8227
|
+
stroke: "currentColor",
|
|
8228
|
+
strokeWidth: 1,
|
|
8229
|
+
children: /* @__PURE__ */ jsx(
|
|
8230
|
+
"path",
|
|
8121
8231
|
{
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
required: true,
|
|
8126
|
-
children: packages.map((pkg) => /* @__PURE__ */ jsx("option", { value: pkg.id, children: pkg.name }, pkg.id))
|
|
8232
|
+
strokeLinecap: "round",
|
|
8233
|
+
strokeLinejoin: "round",
|
|
8234
|
+
d: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"
|
|
8127
8235
|
}
|
|
8128
8236
|
)
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
/* @__PURE__ */
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8237
|
+
}
|
|
8238
|
+
),
|
|
8239
|
+
/* @__PURE__ */ jsx("p", { children: noReports })
|
|
8240
|
+
] })
|
|
8241
|
+
] })
|
|
8242
|
+
] }),
|
|
8243
|
+
!connected && !error && /* @__PURE__ */ jsxs("div", { className: "border-border rounded-lg border border-dashed p-8 text-center", children: [
|
|
8244
|
+
/* @__PURE__ */ jsx(
|
|
8245
|
+
"svg",
|
|
8246
|
+
{
|
|
8247
|
+
className: "text-muted-foreground/30 mx-auto mb-4 h-12 w-12",
|
|
8248
|
+
fill: "none",
|
|
8249
|
+
viewBox: "0 0 24 24",
|
|
8250
|
+
stroke: "currentColor",
|
|
8251
|
+
strokeWidth: 1,
|
|
8252
|
+
children: /* @__PURE__ */ jsx(
|
|
8253
|
+
"path",
|
|
8254
|
+
{
|
|
8255
|
+
strokeLinecap: "round",
|
|
8256
|
+
strokeLinejoin: "round",
|
|
8257
|
+
d: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"
|
|
8258
|
+
}
|
|
8259
|
+
)
|
|
8260
|
+
}
|
|
8261
|
+
),
|
|
8262
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-4", children: "Connect your Checkr account to run background checks on candidates" }),
|
|
8263
|
+
/* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: onConnect, children: [
|
|
8264
|
+
/* @__PURE__ */ jsx(
|
|
8265
|
+
"svg",
|
|
8266
|
+
{
|
|
8267
|
+
className: "mr-2 h-4 w-4",
|
|
8268
|
+
fill: "none",
|
|
8269
|
+
viewBox: "0 0 24 24",
|
|
8270
|
+
stroke: "currentColor",
|
|
8271
|
+
strokeWidth: 2,
|
|
8272
|
+
children: /* @__PURE__ */ jsx(
|
|
8273
|
+
"path",
|
|
8143
8274
|
{
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
|
|
8275
|
+
strokeLinecap: "round",
|
|
8276
|
+
strokeLinejoin: "round",
|
|
8277
|
+
d: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"
|
|
8147
8278
|
}
|
|
8148
8279
|
)
|
|
8149
|
-
|
|
8280
|
+
}
|
|
8281
|
+
),
|
|
8282
|
+
connect
|
|
8283
|
+
] })
|
|
8284
|
+
] }),
|
|
8285
|
+
/* @__PURE__ */ jsxs(Modal, { open: showInviteModal, onOpenChange: setShowInviteModal, size: "md", children: [
|
|
8286
|
+
/* @__PURE__ */ jsxs(ModalHeader, { children: [
|
|
8287
|
+
/* @__PURE__ */ jsx(ModalTitle, { children: inviteCandidate }),
|
|
8288
|
+
/* @__PURE__ */ jsx(ModalClose, {})
|
|
8289
|
+
] }),
|
|
8290
|
+
/* @__PURE__ */ jsxs("form", { onSubmit: handleInviteSubmit, children: [
|
|
8291
|
+
/* @__PURE__ */ jsx(ModalBody, { children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
8292
|
+
/* @__PURE__ */ jsx(
|
|
8293
|
+
Input,
|
|
8294
|
+
{
|
|
8295
|
+
label: name,
|
|
8296
|
+
value: candidateName,
|
|
8297
|
+
onChange: (e) => setCandidateName(e.target.value),
|
|
8298
|
+
required: true
|
|
8299
|
+
}
|
|
8300
|
+
),
|
|
8301
|
+
/* @__PURE__ */ jsx(
|
|
8302
|
+
Input,
|
|
8303
|
+
{
|
|
8304
|
+
label: email,
|
|
8305
|
+
type: "email",
|
|
8306
|
+
value: candidateEmail,
|
|
8307
|
+
onChange: (e) => setCandidateEmail(e.target.value),
|
|
8308
|
+
required: true
|
|
8309
|
+
}
|
|
8310
|
+
),
|
|
8311
|
+
/* @__PURE__ */ jsx(
|
|
8312
|
+
Input,
|
|
8313
|
+
{
|
|
8314
|
+
label: phone,
|
|
8315
|
+
type: "tel",
|
|
8316
|
+
value: candidatePhone,
|
|
8317
|
+
onChange: (e) => setCandidatePhone(e.target.value)
|
|
8318
|
+
}
|
|
8319
|
+
),
|
|
8320
|
+
/* @__PURE__ */ jsx(
|
|
8321
|
+
Select,
|
|
8322
|
+
{
|
|
8323
|
+
label: packageLabel,
|
|
8324
|
+
options: packageOptions,
|
|
8325
|
+
value: selectedPackage,
|
|
8326
|
+
onValueChange: setSelectedPackage
|
|
8327
|
+
}
|
|
8328
|
+
)
|
|
8329
|
+
] }) }),
|
|
8330
|
+
/* @__PURE__ */ jsxs(ModalFooter, { children: [
|
|
8331
|
+
/* @__PURE__ */ jsx(
|
|
8332
|
+
Button,
|
|
8333
|
+
{
|
|
8334
|
+
type: "button",
|
|
8335
|
+
variant: "outline",
|
|
8336
|
+
onClick: () => setShowInviteModal(false),
|
|
8337
|
+
children: cancel
|
|
8338
|
+
}
|
|
8339
|
+
),
|
|
8340
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", variant: "primary", children: submit })
|
|
8150
8341
|
] })
|
|
8151
8342
|
] })
|
|
8152
8343
|
] })
|
|
@@ -9275,10 +9466,6 @@ function CSVColumnMapper({
|
|
|
9275
9466
|
includeAll = "Include All",
|
|
9276
9467
|
ignoreUncompleted = "Ignore Uncompleted",
|
|
9277
9468
|
import: importLabel = "Import",
|
|
9278
|
-
ignore = "Ignore",
|
|
9279
|
-
include = "Include",
|
|
9280
|
-
incomingSample = "Incoming Sample",
|
|
9281
|
-
fieldType = "Field Type",
|
|
9282
9469
|
ensureAccurateData = "Ensure Accurate Employee Data",
|
|
9283
9470
|
ensureAccurateDataDescription = "Existing employee profiles will be automatically updated.",
|
|
9284
9471
|
instructions = "Map each column from your CSV to the corresponding employee field."
|
|
@@ -9287,13 +9474,13 @@ function CSVColumnMapper({
|
|
|
9287
9474
|
return [name, ...parts].join("-").replace(/[^a-zA-Z0-9-]/g, "-").toLowerCase();
|
|
9288
9475
|
};
|
|
9289
9476
|
return /* @__PURE__ */ jsxs("div", { className: cn("csv-column-mapper", className), children: [
|
|
9290
|
-
importing && /* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center
|
|
9291
|
-
/* @__PURE__ */ jsx("div", { className: "bg-primary p-4
|
|
9477
|
+
importing && /* @__PURE__ */ jsx("div", { className: "bg-foreground/50 fixed inset-0 z-50 flex items-center justify-center", children: /* @__PURE__ */ jsxs("div", { className: "bg-card text-card-foreground w-full max-w-lg rounded-lg shadow-xl", children: [
|
|
9478
|
+
/* @__PURE__ */ jsx("div", { className: "bg-primary text-primary-foreground p-4", children: /* @__PURE__ */ jsx("h4", { className: "text-lg font-semibold", children: "Processing Employees" }) }),
|
|
9292
9479
|
/* @__PURE__ */ jsxs("div", { className: "p-6", children: [
|
|
9293
|
-
/* @__PURE__ */ jsx("div", { className: "h-4 w-full overflow-hidden rounded-full
|
|
9480
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted h-4 w-full overflow-hidden rounded-full", children: /* @__PURE__ */ jsx(
|
|
9294
9481
|
"div",
|
|
9295
9482
|
{
|
|
9296
|
-
className: "h-full
|
|
9483
|
+
className: "bg-success h-full transition-all duration-300",
|
|
9297
9484
|
style: { width: `${importProgress}%` }
|
|
9298
9485
|
}
|
|
9299
9486
|
) }),
|
|
@@ -9305,36 +9492,36 @@ function CSVColumnMapper({
|
|
|
9305
9492
|
] }) }),
|
|
9306
9493
|
/* @__PURE__ */ jsxs("div", { className: "mb-4 flex flex-wrap gap-2", children: [
|
|
9307
9494
|
/* @__PURE__ */ jsx(
|
|
9308
|
-
|
|
9495
|
+
Button,
|
|
9309
9496
|
{
|
|
9310
|
-
|
|
9497
|
+
variant: "primary",
|
|
9498
|
+
size: "sm",
|
|
9311
9499
|
onClick: () => onBulkAction?.("ignoreAll"),
|
|
9312
|
-
className: "bg-primary hover:bg-primary/90 rounded-lg px-4 py-2 text-white",
|
|
9313
9500
|
children: ignoreAll
|
|
9314
9501
|
}
|
|
9315
9502
|
),
|
|
9316
9503
|
/* @__PURE__ */ jsx(
|
|
9317
|
-
|
|
9504
|
+
Button,
|
|
9318
9505
|
{
|
|
9319
|
-
|
|
9506
|
+
variant: "primary",
|
|
9507
|
+
size: "sm",
|
|
9320
9508
|
onClick: () => onBulkAction?.("ignoreUncompleted"),
|
|
9321
|
-
className: "bg-primary hover:bg-primary/90 rounded-lg px-4 py-2 text-white",
|
|
9322
9509
|
children: ignoreUncompleted
|
|
9323
9510
|
}
|
|
9324
9511
|
),
|
|
9325
9512
|
/* @__PURE__ */ jsx(
|
|
9326
|
-
|
|
9513
|
+
Button,
|
|
9327
9514
|
{
|
|
9328
|
-
|
|
9515
|
+
variant: "primary",
|
|
9516
|
+
size: "sm",
|
|
9329
9517
|
onClick: () => onBulkAction?.("includeAll"),
|
|
9330
|
-
className: "bg-primary hover:bg-primary/90 rounded-lg px-4 py-2 text-white",
|
|
9331
9518
|
children: includeAll
|
|
9332
9519
|
}
|
|
9333
9520
|
)
|
|
9334
9521
|
] }),
|
|
9335
|
-
/* @__PURE__ */ jsxs("div", { className: "mb-4 rounded-lg border
|
|
9336
|
-
/* @__PURE__ */ jsx("h4", { className: "mb-1 font-semibold
|
|
9337
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
9522
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-primary/10 border-primary/30 mb-4 rounded-lg border p-4", children: [
|
|
9523
|
+
/* @__PURE__ */ jsx("h4", { className: "text-primary-800 dark:text-primary-200 mb-1 font-semibold", children: ensureAccurateData }),
|
|
9524
|
+
/* @__PURE__ */ jsx("p", { className: "text-primary-700 dark:text-primary-300 text-sm", children: ensureAccurateDataDescription })
|
|
9338
9525
|
] }),
|
|
9339
9526
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-4", children: instructions }),
|
|
9340
9527
|
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4", children: columns.map((column, index) => /* @__PURE__ */ jsx(
|
|
@@ -9346,21 +9533,11 @@ function CSVColumnMapper({
|
|
|
9346
9533
|
childFieldOptions: column.mappedTo ? childFieldOptions[column.mappedTo] : void 0,
|
|
9347
9534
|
onMappingChange: (mappedTo, childField) => onColumnChange?.(index, mappedTo, childField),
|
|
9348
9535
|
onIgnoreToggle: (ignored) => onIgnoreToggle?.(index, ignored),
|
|
9349
|
-
formatHtmlId
|
|
9350
|
-
labels: { ignore, include, incomingSample, fieldType }
|
|
9536
|
+
formatHtmlId
|
|
9351
9537
|
},
|
|
9352
9538
|
column.name
|
|
9353
9539
|
)) }),
|
|
9354
|
-
/* @__PURE__ */ jsx("div", { className: "mt-6 flex justify-end", children: /* @__PURE__ */ jsx(
|
|
9355
|
-
"button",
|
|
9356
|
-
{
|
|
9357
|
-
type: "button",
|
|
9358
|
-
onClick: onImport,
|
|
9359
|
-
disabled: importing,
|
|
9360
|
-
className: "rounded-lg bg-green-600 px-6 py-2 text-white hover:bg-green-700 disabled:bg-gray-300",
|
|
9361
|
-
children: importLabel
|
|
9362
|
-
}
|
|
9363
|
-
) })
|
|
9540
|
+
/* @__PURE__ */ jsx("div", { className: "mt-6 flex justify-end", children: /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: onImport, disabled: importing, children: importLabel }) })
|
|
9364
9541
|
] });
|
|
9365
9542
|
}
|
|
9366
9543
|
function CSVColumnCard({
|
|
@@ -9370,112 +9547,158 @@ function CSVColumnCard({
|
|
|
9370
9547
|
childFieldOptions,
|
|
9371
9548
|
onMappingChange,
|
|
9372
9549
|
onIgnoreToggle,
|
|
9373
|
-
formatHtmlId
|
|
9374
|
-
labels
|
|
9550
|
+
formatHtmlId
|
|
9375
9551
|
}) {
|
|
9376
9552
|
const needsMapping = !column.ignored && !column.mappedTo;
|
|
9377
9553
|
const hasError = column.hasError || needsMapping;
|
|
9554
|
+
const selectOptions = fieldOptions.map((opt) => ({
|
|
9555
|
+
value: opt.value,
|
|
9556
|
+
label: opt.label,
|
|
9557
|
+
disabled: opt.disabled
|
|
9558
|
+
}));
|
|
9559
|
+
const childSelectOptions = childFieldOptions?.map(
|
|
9560
|
+
(opt) => ({
|
|
9561
|
+
value: opt.value,
|
|
9562
|
+
label: opt.label,
|
|
9563
|
+
disabled: opt.disabled
|
|
9564
|
+
})
|
|
9565
|
+
);
|
|
9566
|
+
const isMapped = !!column.mappedTo && !column.ignored;
|
|
9378
9567
|
return /* @__PURE__ */ jsxs(
|
|
9379
9568
|
"div",
|
|
9380
9569
|
{
|
|
9381
9570
|
className: cn(
|
|
9382
|
-
"rounded-
|
|
9383
|
-
column.ignored
|
|
9384
|
-
hasError && !column.ignored && "border-red-500"
|
|
9571
|
+
"bg-card text-card-foreground rounded-xl border-2 shadow-sm",
|
|
9572
|
+
column.ignored ? "border-border opacity-50" : isMapped ? "border-success/30" : "border-warning/30"
|
|
9385
9573
|
),
|
|
9386
9574
|
children: [
|
|
9387
|
-
/* @__PURE__ */
|
|
9388
|
-
"
|
|
9389
|
-
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9575
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [
|
|
9576
|
+
!column.ignored && (isMapped ? /* @__PURE__ */ jsx("span", { className: "bg-success text-success-foreground flex h-5 w-5 shrink-0 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx(
|
|
9577
|
+
"svg",
|
|
9578
|
+
{
|
|
9579
|
+
className: "h-3 w-3",
|
|
9580
|
+
fill: "none",
|
|
9581
|
+
viewBox: "0 0 24 24",
|
|
9582
|
+
stroke: "currentColor",
|
|
9583
|
+
strokeWidth: 3,
|
|
9584
|
+
children: /* @__PURE__ */ jsx(
|
|
9585
|
+
"path",
|
|
9586
|
+
{
|
|
9587
|
+
strokeLinecap: "round",
|
|
9588
|
+
strokeLinejoin: "round",
|
|
9589
|
+
d: "M5 13l4 4L19 7"
|
|
9590
|
+
}
|
|
9591
|
+
)
|
|
9592
|
+
}
|
|
9593
|
+
) }) : /* @__PURE__ */ jsx("span", { className: "bg-warning text-warning-foreground flex h-5 w-5 shrink-0 items-center justify-center rounded-full", children: /* @__PURE__ */ jsxs("svg", { className: "h-3 w-3", fill: "currentColor", viewBox: "0 0 24 24", children: [
|
|
9594
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor" }),
|
|
9595
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "4", className: "fill-warning" })
|
|
9596
|
+
] }) })),
|
|
9597
|
+
/* @__PURE__ */ jsx("h6", { className: "truncate text-sm font-semibold", title: column.name, children: column.name })
|
|
9598
|
+
] }),
|
|
9599
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4 px-4 pb-4", children: [
|
|
9600
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
9601
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground mb-1 block text-xs font-semibold tracking-wider uppercase", children: "Sample Data" }),
|
|
9602
|
+
/* @__PURE__ */ jsx(
|
|
9603
|
+
"div",
|
|
9604
|
+
{
|
|
9605
|
+
className: "bg-muted truncate rounded-md px-3 py-2 font-mono text-sm",
|
|
9606
|
+
title: column.sampleValue,
|
|
9607
|
+
children: column.sampleValue || /* @__PURE__ */ jsx("em", { className: "text-muted-foreground", children: "Empty" })
|
|
9608
|
+
}
|
|
9609
|
+
)
|
|
9399
9610
|
] }),
|
|
9400
|
-
/* @__PURE__ */
|
|
9401
|
-
|
|
9402
|
-
/* @__PURE__ */ jsx(
|
|
9403
|
-
|
|
9404
|
-
"select",
|
|
9611
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
9612
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground mb-1 block text-xs font-semibold tracking-wider uppercase", children: "Map to Field" }),
|
|
9613
|
+
/* @__PURE__ */ jsx(
|
|
9614
|
+
"div",
|
|
9405
9615
|
{
|
|
9406
|
-
id: formatHtmlId(column.name),
|
|
9407
|
-
value: column.mappedTo || "",
|
|
9408
|
-
onChange: (e) => onMappingChange(e.target.value, void 0),
|
|
9409
|
-
disabled: column.ignored,
|
|
9410
9616
|
className: cn(
|
|
9411
|
-
"
|
|
9412
|
-
column.ignored && "
|
|
9617
|
+
"rounded-md",
|
|
9618
|
+
hasError && !column.ignored && "ring-warning/50 ring-2"
|
|
9413
9619
|
),
|
|
9414
|
-
children:
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9620
|
+
children: /* @__PURE__ */ jsx(
|
|
9621
|
+
Select,
|
|
9622
|
+
{
|
|
9623
|
+
id: formatHtmlId(column.name),
|
|
9624
|
+
options: selectOptions,
|
|
9625
|
+
value: column.mappedTo || "",
|
|
9626
|
+
onValueChange: (value) => onMappingChange(value, void 0),
|
|
9627
|
+
disabled: column.ignored,
|
|
9628
|
+
placeholder: "Select a field...",
|
|
9629
|
+
size: "sm",
|
|
9630
|
+
hideLabel: true,
|
|
9631
|
+
className: cn(
|
|
9632
|
+
hasError && !column.ignored && "border-warning text-warning placeholder:text-warning"
|
|
9633
|
+
)
|
|
9634
|
+
}
|
|
9635
|
+
)
|
|
9427
9636
|
}
|
|
9428
9637
|
)
|
|
9429
9638
|
] }),
|
|
9430
|
-
|
|
9639
|
+
childSelectOptions && childSelectOptions.length > 0 && column.mappedTo && /* @__PURE__ */ jsxs("div", { children: [
|
|
9640
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground mb-1 block text-xs font-semibold tracking-wider uppercase", children: "Sub-field" }),
|
|
9431
9641
|
/* @__PURE__ */ jsx(
|
|
9432
|
-
|
|
9433
|
-
{
|
|
9434
|
-
htmlFor: formatHtmlId(column.name, column.mappedTo),
|
|
9435
|
-
className: "sr-only",
|
|
9436
|
-
children: "Sub-field"
|
|
9437
|
-
}
|
|
9438
|
-
),
|
|
9439
|
-
/* @__PURE__ */ jsxs(
|
|
9440
|
-
"select",
|
|
9642
|
+
Select,
|
|
9441
9643
|
{
|
|
9442
9644
|
id: formatHtmlId(column.name, column.mappedTo),
|
|
9645
|
+
options: childSelectOptions,
|
|
9443
9646
|
value: column.childField || "",
|
|
9444
|
-
|
|
9647
|
+
onValueChange: (value) => onMappingChange(column.mappedTo, value),
|
|
9445
9648
|
disabled: column.ignored,
|
|
9446
|
-
|
|
9447
|
-
|
|
9448
|
-
|
|
9449
|
-
),
|
|
9450
|
-
children: [
|
|
9451
|
-
/* @__PURE__ */ jsx("option", { value: "", disabled: true, children: "Select sub-field..." }),
|
|
9452
|
-
childFieldOptions.map((opt) => /* @__PURE__ */ jsx(
|
|
9453
|
-
"option",
|
|
9454
|
-
{
|
|
9455
|
-
value: opt.value,
|
|
9456
|
-
disabled: opt.disabled,
|
|
9457
|
-
className: opt.disabled ? "text-red-500" : "",
|
|
9458
|
-
children: opt.label
|
|
9459
|
-
},
|
|
9460
|
-
opt.value
|
|
9461
|
-
))
|
|
9462
|
-
]
|
|
9649
|
+
placeholder: "Select sub-field...",
|
|
9650
|
+
size: "sm",
|
|
9651
|
+
hideLabel: true
|
|
9463
9652
|
}
|
|
9464
9653
|
)
|
|
9465
|
-
] })
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
|
|
9475
|
-
|
|
9476
|
-
|
|
9477
|
-
|
|
9478
|
-
|
|
9654
|
+
] }),
|
|
9655
|
+
/* @__PURE__ */ jsxs(
|
|
9656
|
+
"button",
|
|
9657
|
+
{
|
|
9658
|
+
type: "button",
|
|
9659
|
+
onClick: () => onIgnoreToggle(!column.ignored),
|
|
9660
|
+
className: "text-muted-foreground hover:text-foreground mx-auto flex items-center gap-1 text-xs transition-colors",
|
|
9661
|
+
children: [
|
|
9662
|
+
column.ignored ? /* @__PURE__ */ jsx(
|
|
9663
|
+
"svg",
|
|
9664
|
+
{
|
|
9665
|
+
className: "h-3 w-3",
|
|
9666
|
+
fill: "none",
|
|
9667
|
+
viewBox: "0 0 24 24",
|
|
9668
|
+
stroke: "currentColor",
|
|
9669
|
+
strokeWidth: 2,
|
|
9670
|
+
children: /* @__PURE__ */ jsx(
|
|
9671
|
+
"path",
|
|
9672
|
+
{
|
|
9673
|
+
strokeLinecap: "round",
|
|
9674
|
+
strokeLinejoin: "round",
|
|
9675
|
+
d: "M12 4v16m8-8H4"
|
|
9676
|
+
}
|
|
9677
|
+
)
|
|
9678
|
+
}
|
|
9679
|
+
) : /* @__PURE__ */ jsx(
|
|
9680
|
+
"svg",
|
|
9681
|
+
{
|
|
9682
|
+
className: "h-3 w-3",
|
|
9683
|
+
fill: "none",
|
|
9684
|
+
viewBox: "0 0 24 24",
|
|
9685
|
+
stroke: "currentColor",
|
|
9686
|
+
strokeWidth: 2,
|
|
9687
|
+
children: /* @__PURE__ */ jsx(
|
|
9688
|
+
"path",
|
|
9689
|
+
{
|
|
9690
|
+
strokeLinecap: "round",
|
|
9691
|
+
strokeLinejoin: "round",
|
|
9692
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
9693
|
+
}
|
|
9694
|
+
)
|
|
9695
|
+
}
|
|
9696
|
+
),
|
|
9697
|
+
column.ignored ? "Include Column" : "Ignore Column"
|
|
9698
|
+
]
|
|
9699
|
+
}
|
|
9700
|
+
)
|
|
9701
|
+
] })
|
|
9479
9702
|
]
|
|
9480
9703
|
}
|
|
9481
9704
|
);
|
|
@@ -9525,7 +9748,7 @@ function CSVFileUpload({
|
|
|
9525
9748
|
{
|
|
9526
9749
|
className: cn(
|
|
9527
9750
|
"flex min-h-[300px] flex-col items-center justify-center rounded-lg border-2 border-dashed p-8 text-center transition-colors",
|
|
9528
|
-
isDragging ? "border-primary bg-primary/5" : "border-
|
|
9751
|
+
isDragging ? "border-primary bg-primary/5" : "border-border bg-muted",
|
|
9529
9752
|
className
|
|
9530
9753
|
),
|
|
9531
9754
|
onDrop: handleDrop,
|
|
@@ -9547,14 +9770,14 @@ function CSVFileUpload({
|
|
|
9547
9770
|
/* @__PURE__ */ jsx("div", { className: "border-primary h-12 w-12 animate-spin rounded-full border-4 border-t-transparent" }),
|
|
9548
9771
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-4", children: "Processing file..." })
|
|
9549
9772
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9550
|
-
/* @__PURE__ */ jsx("i", { className: "fas fa-file-csv mb-4 text-5xl
|
|
9773
|
+
/* @__PURE__ */ jsx("i", { className: "fas fa-file-csv text-muted-foreground mb-4 text-5xl" }),
|
|
9551
9774
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-4 text-lg", children: selectFile }),
|
|
9552
9775
|
/* @__PURE__ */ jsx(
|
|
9553
9776
|
"button",
|
|
9554
9777
|
{
|
|
9555
9778
|
type: "button",
|
|
9556
9779
|
onClick: () => inputRef.current?.click(),
|
|
9557
|
-
className: "bg-primary hover:bg-primary/90 rounded-lg px-6 py-3
|
|
9780
|
+
className: "bg-primary text-primary-foreground hover:bg-primary/90 rounded-lg px-6 py-3",
|
|
9558
9781
|
children: selectButton
|
|
9559
9782
|
}
|
|
9560
9783
|
)
|
|
@@ -12321,16 +12544,16 @@ function EditUserRoleModal({
|
|
|
12321
12544
|
};
|
|
12322
12545
|
return /* @__PURE__ */ jsxs(Modal, { open, onOpenChange, size: "md", children: [
|
|
12323
12546
|
/* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx(ModalTitle, { children: "Edit User Role" }) }),
|
|
12324
|
-
/* @__PURE__ */ jsxs(
|
|
12325
|
-
user && /* @__PURE__ */ jsxs("div", { className: "rounded-lg
|
|
12326
|
-
/* @__PURE__ */ jsx("p", { className: "
|
|
12327
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
12547
|
+
/* @__PURE__ */ jsxs(ModalBody, { className: "space-y-4", children: [
|
|
12548
|
+
user && /* @__PURE__ */ jsxs("div", { className: "bg-muted rounded-lg p-3", children: [
|
|
12549
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground font-medium", children: user.name }),
|
|
12550
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: user.email })
|
|
12328
12551
|
] }),
|
|
12329
|
-
errorMessage && /* @__PURE__ */ jsx("div", { className: "
|
|
12552
|
+
errorMessage && /* @__PURE__ */ jsx("div", { className: "border-destructive/30 bg-destructive/10 rounded-lg border p-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
12330
12553
|
/* @__PURE__ */ jsx(
|
|
12331
12554
|
"svg",
|
|
12332
12555
|
{
|
|
12333
|
-
className: "h-5 w-5
|
|
12556
|
+
className: "text-destructive h-5 w-5",
|
|
12334
12557
|
fill: "none",
|
|
12335
12558
|
viewBox: "0 0 24 24",
|
|
12336
12559
|
stroke: "currentColor",
|
|
@@ -12345,7 +12568,7 @@ function EditUserRoleModal({
|
|
|
12345
12568
|
)
|
|
12346
12569
|
}
|
|
12347
12570
|
),
|
|
12348
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
12571
|
+
/* @__PURE__ */ jsx("p", { className: "text-destructive text-sm", children: errorMessage })
|
|
12349
12572
|
] }) }),
|
|
12350
12573
|
/* @__PURE__ */ jsx(
|
|
12351
12574
|
Select,
|
|
@@ -12360,13 +12583,13 @@ function EditUserRoleModal({
|
|
|
12360
12583
|
}))
|
|
12361
12584
|
}
|
|
12362
12585
|
),
|
|
12363
|
-
selectedRole?.description && /* @__PURE__ */ jsx("div", { className: "rounded-lg
|
|
12586
|
+
selectedRole?.description && /* @__PURE__ */ jsx("div", { className: "bg-primary/10 rounded-lg p-3", children: /* @__PURE__ */ jsx("p", { className: "text-primary text-sm", children: selectedRole.description }) }),
|
|
12364
12587
|
selectedRole?.permissions && selectedRole.permissions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
12365
|
-
/* @__PURE__ */ jsx("span", { className: "mb-2 block text-sm font-medium
|
|
12588
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground mb-2 block text-sm font-medium", children: "Permissions" }),
|
|
12366
12589
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: selectedRole.permissions.map((permission) => /* @__PURE__ */ jsx(
|
|
12367
12590
|
"span",
|
|
12368
12591
|
{
|
|
12369
|
-
className: "
|
|
12592
|
+
className: "bg-muted text-muted-foreground rounded-full px-2 py-1 text-xs font-medium",
|
|
12370
12593
|
children: permission
|
|
12371
12594
|
},
|
|
12372
12595
|
permission
|
|
@@ -13850,21 +14073,21 @@ function EmployerServiceModal({
|
|
|
13850
14073
|
"Configure Service for ",
|
|
13851
14074
|
employer?.name || "Employer"
|
|
13852
14075
|
] }) }),
|
|
13853
|
-
/* @__PURE__ */ jsxs(
|
|
13854
|
-
errorMessage && /* @__PURE__ */ jsx("div", { className: "
|
|
13855
|
-
service && /* @__PURE__ */ jsxs("div", { className: "
|
|
13856
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium
|
|
13857
|
-
/* @__PURE__ */ jsxs("p", { className: "text-
|
|
14076
|
+
/* @__PURE__ */ jsxs(ModalBody, { className: "space-y-4", children: [
|
|
14077
|
+
errorMessage && /* @__PURE__ */ jsx("div", { className: "border-destructive/30 bg-destructive/10 rounded-lg border p-3", children: /* @__PURE__ */ jsx("p", { className: "text-destructive text-sm", children: errorMessage }) }),
|
|
14078
|
+
service && /* @__PURE__ */ jsxs("div", { className: "border-primary/30 bg-primary/10 rounded-lg border p-3", children: [
|
|
14079
|
+
/* @__PURE__ */ jsx("p", { className: "text-primary text-sm font-medium", children: service.name }),
|
|
14080
|
+
/* @__PURE__ */ jsxs("p", { className: "text-primary/80 text-xs", children: [
|
|
13858
14081
|
"Base price: $",
|
|
13859
14082
|
service.basePrice.toFixed(2)
|
|
13860
14083
|
] })
|
|
13861
14084
|
] }),
|
|
13862
14085
|
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
13863
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium
|
|
14086
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground text-sm font-medium", children: "Pricing" }),
|
|
13864
14087
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
13865
14088
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
13866
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
13867
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
14089
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground text-sm", children: "Use Base Price" }),
|
|
14090
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: "Use the service's default pricing" })
|
|
13868
14091
|
] }),
|
|
13869
14092
|
/* @__PURE__ */ jsx(
|
|
13870
14093
|
Switch,
|
|
@@ -13878,17 +14101,17 @@ function EmployerServiceModal({
|
|
|
13878
14101
|
}
|
|
13879
14102
|
)
|
|
13880
14103
|
] }),
|
|
13881
|
-
!config.useBasePrice && /* @__PURE__ */ jsxs("div", { className: "ml-4 border-l-2
|
|
14104
|
+
!config.useBasePrice && /* @__PURE__ */ jsxs("div", { className: "border-border ml-4 border-l-2 pl-4", children: [
|
|
13882
14105
|
/* @__PURE__ */ jsx(
|
|
13883
14106
|
"label",
|
|
13884
14107
|
{
|
|
13885
14108
|
htmlFor: "custom-price",
|
|
13886
|
-
className: "mb-1 block text-sm font-medium
|
|
14109
|
+
className: "text-foreground mb-1 block text-sm font-medium",
|
|
13887
14110
|
children: "Custom Price"
|
|
13888
14111
|
}
|
|
13889
14112
|
),
|
|
13890
14113
|
/* @__PURE__ */ jsxs("div", { className: "relative w-40", children: [
|
|
13891
|
-
/* @__PURE__ */ jsx("span", { className: "absolute top-1/2 left-3 -translate-y-1/2
|
|
14114
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground absolute top-1/2 left-3 -translate-y-1/2", children: "$" }),
|
|
13892
14115
|
/* @__PURE__ */ jsx(
|
|
13893
14116
|
"input",
|
|
13894
14117
|
{
|
|
@@ -13896,7 +14119,7 @@ function EmployerServiceModal({
|
|
|
13896
14119
|
type: "number",
|
|
13897
14120
|
min: "0",
|
|
13898
14121
|
step: "0.01",
|
|
13899
|
-
className: "w-full rounded-md border
|
|
14122
|
+
className: "border-input bg-background text-foreground focus:ring-ring w-full rounded-md border py-2 pr-4 pl-7 shadow-sm focus:ring-2 focus:outline-none",
|
|
13900
14123
|
value: config.customPrice ?? "",
|
|
13901
14124
|
onChange: (e) => setConfig((prev) => ({
|
|
13902
14125
|
...prev,
|
|
@@ -13918,11 +14141,11 @@ function EmployerServiceModal({
|
|
|
13918
14141
|
}
|
|
13919
14142
|
),
|
|
13920
14143
|
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
13921
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium
|
|
14144
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground text-sm font-medium", children: "Order Handling" }),
|
|
13922
14145
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
13923
14146
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
13924
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
13925
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
14147
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground text-sm", children: "Auto-Accept Orders" }),
|
|
14148
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: "Automatically accept orders from this employer" })
|
|
13926
14149
|
] }),
|
|
13927
14150
|
/* @__PURE__ */ jsx(
|
|
13928
14151
|
Switch,
|
|
@@ -13934,8 +14157,8 @@ function EmployerServiceModal({
|
|
|
13934
14157
|
] }),
|
|
13935
14158
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
13936
14159
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
13937
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
13938
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
14160
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground text-sm", children: "Requires Approval" }),
|
|
14161
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: "Orders need manual approval before processing" })
|
|
13939
14162
|
] }),
|
|
13940
14163
|
/* @__PURE__ */ jsx(
|
|
13941
14164
|
Switch,
|
|
@@ -13947,11 +14170,11 @@ function EmployerServiceModal({
|
|
|
13947
14170
|
] })
|
|
13948
14171
|
] }),
|
|
13949
14172
|
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
13950
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium
|
|
14173
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground text-sm font-medium", children: "Notifications" }),
|
|
13951
14174
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
13952
14175
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
13953
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
13954
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
14176
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground text-sm", children: "Notify on New Orders" }),
|
|
14177
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: "Send email when orders are placed" })
|
|
13955
14178
|
] }),
|
|
13956
14179
|
/* @__PURE__ */ jsx(
|
|
13957
14180
|
Switch,
|
|
@@ -13961,7 +14184,7 @@ function EmployerServiceModal({
|
|
|
13961
14184
|
}
|
|
13962
14185
|
)
|
|
13963
14186
|
] }),
|
|
13964
|
-
config.notifyOnOrder && /* @__PURE__ */ jsx("div", { className: "ml-4 border-l-2
|
|
14187
|
+
config.notifyOnOrder && /* @__PURE__ */ jsx("div", { className: "border-border ml-4 border-l-2 pl-4", children: /* @__PURE__ */ jsx(
|
|
13965
14188
|
Input,
|
|
13966
14189
|
{
|
|
13967
14190
|
label: "Notification Email",
|
|
@@ -13980,7 +14203,7 @@ function EmployerServiceModal({
|
|
|
13980
14203
|
"label",
|
|
13981
14204
|
{
|
|
13982
14205
|
htmlFor: "employer-service-notes",
|
|
13983
|
-
className: "mb-1 block text-sm font-medium
|
|
14206
|
+
className: "text-foreground mb-1 block text-sm font-medium",
|
|
13984
14207
|
children: "Internal Notes"
|
|
13985
14208
|
}
|
|
13986
14209
|
),
|
|
@@ -13988,7 +14211,7 @@ function EmployerServiceModal({
|
|
|
13988
14211
|
"textarea",
|
|
13989
14212
|
{
|
|
13990
14213
|
id: "employer-service-notes",
|
|
13991
|
-
className: "w-full rounded-md border
|
|
14214
|
+
className: "border-input bg-background text-foreground focus:ring-ring w-full rounded-md border px-3 py-2 shadow-sm focus:ring-2 focus:outline-none",
|
|
13992
14215
|
rows: 3,
|
|
13993
14216
|
value: config.notes || "",
|
|
13994
14217
|
onChange: (e) => setConfig((prev) => ({ ...prev, notes: e.target.value })),
|
|
@@ -14243,24 +14466,27 @@ function AccessDeniedPage({
|
|
|
14243
14466
|
);
|
|
14244
14467
|
}
|
|
14245
14468
|
function ActionButton({ label, onClick, href, variant }) {
|
|
14246
|
-
const baseClasses = "px-6 py-2.5 rounded-lg font-medium transition-colors min-w-[140px]";
|
|
14247
|
-
const variantClasses = variant === "primary" ? "bg-primary-600 text-white hover:bg-primary-700" : "bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-600";
|
|
14248
14469
|
if (href) {
|
|
14249
14470
|
return /* @__PURE__ */ jsx(
|
|
14250
14471
|
"a",
|
|
14251
14472
|
{
|
|
14252
14473
|
href,
|
|
14253
|
-
className: cn(
|
|
14474
|
+
className: cn(
|
|
14475
|
+
buttonVariants({ variant, size: "md" }),
|
|
14476
|
+
"min-w-[140px] text-center"
|
|
14477
|
+
),
|
|
14254
14478
|
children: label
|
|
14255
14479
|
}
|
|
14256
14480
|
);
|
|
14257
14481
|
}
|
|
14258
14482
|
return /* @__PURE__ */ jsx(
|
|
14259
|
-
|
|
14483
|
+
Button,
|
|
14260
14484
|
{
|
|
14261
14485
|
type: "button",
|
|
14262
14486
|
onClick,
|
|
14263
|
-
|
|
14487
|
+
variant,
|
|
14488
|
+
size: "md",
|
|
14489
|
+
className: "min-w-[140px]",
|
|
14264
14490
|
children: label
|
|
14265
14491
|
}
|
|
14266
14492
|
);
|
|
@@ -15251,7 +15477,7 @@ function HRISProviderSelector({
|
|
|
15251
15477
|
return d.toLocaleString();
|
|
15252
15478
|
};
|
|
15253
15479
|
if (currentProvider) {
|
|
15254
|
-
return /* @__PURE__ */ jsx("div", { className: cn("hris-provider-selector", className), children: /* @__PURE__ */ jsxs("div", { className: "
|
|
15480
|
+
return /* @__PURE__ */ jsx("div", { className: cn("hris-provider-selector", className), children: /* @__PURE__ */ jsxs("div", { className: "border-border bg-muted/50 rounded-lg border p-4", children: [
|
|
15255
15481
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 md:flex-row md:items-center", children: [
|
|
15256
15482
|
currentProvider.logoUrl && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx(
|
|
15257
15483
|
"img",
|
|
@@ -15262,7 +15488,7 @@ function HRISProviderSelector({
|
|
|
15262
15488
|
}
|
|
15263
15489
|
) }),
|
|
15264
15490
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
15265
|
-
/* @__PURE__ */ jsx("h4", { className: "text-lg font-bold", children: currentProvider.displayName }),
|
|
15491
|
+
/* @__PURE__ */ jsx("h4", { className: "text-foreground text-lg font-bold", children: currentProvider.displayName }),
|
|
15266
15492
|
/* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-sm", children: [
|
|
15267
15493
|
"Your data will automatically sync as we receive updates from",
|
|
15268
15494
|
" ",
|
|
@@ -15287,7 +15513,7 @@ function HRISProviderSelector({
|
|
|
15287
15513
|
" ",
|
|
15288
15514
|
/* @__PURE__ */ jsx("span", { className: "text-primary", children: formatLastSync(currentProvider.lastSync) })
|
|
15289
15515
|
] }),
|
|
15290
|
-
!currentProvider.lastSync && /* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center gap-2 rounded-lg border border-yellow-
|
|
15516
|
+
!currentProvider.lastSync && /* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center gap-2 rounded-lg border border-yellow-400 bg-yellow-50 p-3 text-yellow-800 dark:border-yellow-600 dark:bg-yellow-900/30 dark:text-yellow-300", children: [
|
|
15291
15517
|
/* @__PURE__ */ jsx("i", { className: "fas fa-exclamation-triangle text-lg" }),
|
|
15292
15518
|
/* @__PURE__ */ jsx("span", { className: "text-sm", children: syncPending })
|
|
15293
15519
|
] })
|
|
@@ -15299,7 +15525,7 @@ function HRISProviderSelector({
|
|
|
15299
15525
|
{
|
|
15300
15526
|
type: "button",
|
|
15301
15527
|
onClick: onDisconnect,
|
|
15302
|
-
className: "rounded-lg border
|
|
15528
|
+
className: "border-border bg-card text-foreground hover:bg-muted rounded-lg border px-4 py-2",
|
|
15303
15529
|
children: [
|
|
15304
15530
|
/* @__PURE__ */ jsx("i", { className: "fas fa-link-slash mr-2" }),
|
|
15305
15531
|
disconnect
|
|
@@ -15323,7 +15549,7 @@ function HRISProviderSelector({
|
|
|
15323
15549
|
}
|
|
15324
15550
|
return /* @__PURE__ */ jsxs("div", { className: cn("hris-provider-selector", className), children: [
|
|
15325
15551
|
/* @__PURE__ */ jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
15326
|
-
/* @__PURE__ */ jsx("span", { className: "absolute top-1/2 left-3 -translate-y-1/2
|
|
15552
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground absolute top-1/2 left-3 -translate-y-1/2", children: /* @__PURE__ */ jsx("i", { className: "fas fa-search" }) }),
|
|
15327
15553
|
/* @__PURE__ */ jsx(
|
|
15328
15554
|
"input",
|
|
15329
15555
|
{
|
|
@@ -15331,7 +15557,7 @@ function HRISProviderSelector({
|
|
|
15331
15557
|
placeholder: search,
|
|
15332
15558
|
value: searchQuery,
|
|
15333
15559
|
onChange: (e) => onSearchChange?.(e.target.value),
|
|
15334
|
-
className: "focus:border-primary focus:ring-primary w-full rounded-lg border
|
|
15560
|
+
className: "focus:border-primary focus:ring-primary border-input bg-background text-foreground placeholder:text-muted-foreground w-full rounded-lg border py-2 pr-4 pl-10 focus:ring-1 focus:outline-none"
|
|
15335
15561
|
}
|
|
15336
15562
|
)
|
|
15337
15563
|
] }) }),
|
|
@@ -15341,7 +15567,7 @@ function HRISProviderSelector({
|
|
|
15341
15567
|
{
|
|
15342
15568
|
type: "button",
|
|
15343
15569
|
onClick: onCSVImport,
|
|
15344
|
-
className: "flex flex-col items-center justify-center rounded-lg border
|
|
15570
|
+
className: "border-border bg-card dark:hover:bg-muted/50 flex flex-col items-center justify-center rounded-lg border p-4 shadow-sm transition-shadow hover:shadow-md",
|
|
15345
15571
|
children: [
|
|
15346
15572
|
/* @__PURE__ */ jsxs("div", { className: "mb-3 flex h-16 w-16 items-center justify-center", children: [
|
|
15347
15573
|
/* @__PURE__ */ jsx(
|
|
@@ -15358,19 +15584,19 @@ function HRISProviderSelector({
|
|
|
15358
15584
|
}
|
|
15359
15585
|
}
|
|
15360
15586
|
),
|
|
15361
|
-
/* @__PURE__ */ jsx("i", { className: "fas fa-file-csv hidden text-4xl
|
|
15587
|
+
/* @__PURE__ */ jsx("i", { className: "fas fa-file-csv text-muted-foreground hidden text-4xl" })
|
|
15362
15588
|
] }),
|
|
15363
|
-
/* @__PURE__ */ jsx("span", { className: "text-center text-sm font-medium", children: importCSV })
|
|
15589
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground text-center text-sm font-medium", children: importCSV })
|
|
15364
15590
|
]
|
|
15365
15591
|
}
|
|
15366
15592
|
),
|
|
15367
15593
|
loading && /* @__PURE__ */ jsx(Fragment, { children: [1, 2, 3, 4, 5, 6].map((i) => /* @__PURE__ */ jsxs(
|
|
15368
15594
|
"div",
|
|
15369
15595
|
{
|
|
15370
|
-
className: "flex flex-col items-center justify-center rounded-lg border
|
|
15596
|
+
className: "border-border bg-card flex flex-col items-center justify-center rounded-lg border p-4 shadow-sm",
|
|
15371
15597
|
children: [
|
|
15372
|
-
/* @__PURE__ */ jsx("div", { className: "mb-3 h-16 w-16 animate-pulse rounded-lg
|
|
15373
|
-
/* @__PURE__ */ jsx("div", { className: "h-4 w-20 animate-pulse rounded
|
|
15598
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted mb-3 h-16 w-16 animate-pulse rounded-lg" }),
|
|
15599
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted h-4 w-20 animate-pulse rounded" })
|
|
15374
15600
|
]
|
|
15375
15601
|
},
|
|
15376
15602
|
i
|
|
@@ -15380,17 +15606,25 @@ function HRISProviderSelector({
|
|
|
15380
15606
|
{
|
|
15381
15607
|
type: "button",
|
|
15382
15608
|
onClick: () => onProviderSelect?.(provider),
|
|
15383
|
-
className: "flex flex-col items-center justify-center rounded-lg border
|
|
15609
|
+
className: "border-border bg-card dark:hover:bg-muted/50 flex flex-col items-center justify-center rounded-lg border p-4 shadow-sm transition-shadow hover:shadow-md",
|
|
15384
15610
|
children: [
|
|
15385
|
-
/* @__PURE__ */ jsx("div", { className: "mb-3 flex h-16 w-16 items-center justify-center", children: provider.logoUrl ? /* @__PURE__ */
|
|
15386
|
-
|
|
15387
|
-
|
|
15388
|
-
|
|
15389
|
-
|
|
15390
|
-
|
|
15391
|
-
|
|
15392
|
-
|
|
15393
|
-
|
|
15611
|
+
/* @__PURE__ */ jsx("div", { className: "mb-3 flex h-16 w-16 items-center justify-center", children: provider.logoUrl ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15612
|
+
/* @__PURE__ */ jsx(
|
|
15613
|
+
"img",
|
|
15614
|
+
{
|
|
15615
|
+
src: provider.logoUrl,
|
|
15616
|
+
alt: provider.displayName,
|
|
15617
|
+
className: "max-h-full max-w-full object-contain",
|
|
15618
|
+
onError: (e) => {
|
|
15619
|
+
e.currentTarget.style.display = "none";
|
|
15620
|
+
const fallback = e.currentTarget.nextElementSibling;
|
|
15621
|
+
if (fallback) fallback.classList.remove("hidden");
|
|
15622
|
+
}
|
|
15623
|
+
}
|
|
15624
|
+
),
|
|
15625
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted text-muted-foreground hidden h-12 w-12 items-center justify-center rounded-lg text-lg font-bold", children: provider.displayName.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase() })
|
|
15626
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "bg-muted text-muted-foreground flex h-12 w-12 items-center justify-center rounded-lg text-lg font-bold", children: provider.displayName.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase() }) }),
|
|
15627
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground text-center text-sm font-medium", children: provider.displayName })
|
|
15394
15628
|
]
|
|
15395
15629
|
},
|
|
15396
15630
|
provider.id
|
|
@@ -15452,22 +15686,22 @@ function InventoryManager({
|
|
|
15452
15686
|
const previewChange = updateAmount ? updateType === "credit" ? currentInventory + parseInt(updateAmount, 10) : currentInventory - parseInt(updateAmount, 10) : null;
|
|
15453
15687
|
return /* @__PURE__ */ jsxs("div", { className, children: [
|
|
15454
15688
|
/* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
15455
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold
|
|
15456
|
-
/* @__PURE__ */ jsxs("div", { className: "text-2xl font-bold
|
|
15689
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h3", { className: "text-foreground text-lg font-semibold", children: "Remaining Inventory" }) }),
|
|
15690
|
+
/* @__PURE__ */ jsxs("div", { className: "text-foreground text-2xl font-bold", children: [
|
|
15457
15691
|
currentInventory,
|
|
15458
15692
|
" ",
|
|
15459
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-normal
|
|
15693
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-sm font-normal", children: "units" })
|
|
15460
15694
|
] })
|
|
15461
15695
|
] }),
|
|
15462
|
-
/* @__PURE__ */ jsx("hr", { className: "
|
|
15696
|
+
/* @__PURE__ */ jsx("hr", { className: "border-border mb-4" }),
|
|
15463
15697
|
/* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
15464
|
-
/* @__PURE__ */ jsx("h4", { className: "text-base font-semibold
|
|
15698
|
+
/* @__PURE__ */ jsx("h4", { className: "text-foreground text-base font-semibold", children: "Inventory Log" }),
|
|
15465
15699
|
onUpdateClick && /* @__PURE__ */ jsxs(
|
|
15466
15700
|
"button",
|
|
15467
15701
|
{
|
|
15468
15702
|
type: "button",
|
|
15469
15703
|
onClick: onUpdateClick,
|
|
15470
|
-
className: "flex items-center gap-1 text-sm font-medium
|
|
15704
|
+
className: "text-primary hover:text-primary/80 flex items-center gap-1 text-sm font-medium",
|
|
15471
15705
|
children: [
|
|
15472
15706
|
"Update Inventory",
|
|
15473
15707
|
/* @__PURE__ */ jsx(
|
|
@@ -15492,26 +15726,26 @@ function InventoryManager({
|
|
|
15492
15726
|
}
|
|
15493
15727
|
)
|
|
15494
15728
|
] }),
|
|
15495
|
-
/* @__PURE__ */ jsx("hr", { className: "
|
|
15729
|
+
/* @__PURE__ */ jsx("hr", { className: "border-border mb-4" }),
|
|
15496
15730
|
logEntries.length > 0 ? /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "w-full", children: [
|
|
15497
|
-
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { className: "border-
|
|
15498
|
-
/* @__PURE__ */ jsx("th", { className: "py-2 text-left text-xs font-medium tracking-wider
|
|
15499
|
-
/* @__PURE__ */ jsx("th", { className: "py-2 text-left text-xs font-medium tracking-wider
|
|
15500
|
-
/* @__PURE__ */ jsx("th", { className: "py-2 text-left text-xs font-medium tracking-wider
|
|
15501
|
-
/* @__PURE__ */ jsx("th", { className: "py-2 text-right text-xs font-medium tracking-wider
|
|
15731
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { className: "border-border border-b", children: [
|
|
15732
|
+
/* @__PURE__ */ jsx("th", { className: "text-muted-foreground py-2 text-left text-xs font-medium tracking-wider uppercase", children: "Date" }),
|
|
15733
|
+
/* @__PURE__ */ jsx("th", { className: "text-muted-foreground py-2 text-left text-xs font-medium tracking-wider uppercase", children: "User" }),
|
|
15734
|
+
/* @__PURE__ */ jsx("th", { className: "text-muted-foreground py-2 text-left text-xs font-medium tracking-wider uppercase", children: "Change" }),
|
|
15735
|
+
/* @__PURE__ */ jsx("th", { className: "text-muted-foreground py-2 text-right text-xs font-medium tracking-wider uppercase", children: "Quantity" })
|
|
15502
15736
|
] }) }),
|
|
15503
|
-
/* @__PURE__ */ jsx("tbody", { className: "divide-
|
|
15737
|
+
/* @__PURE__ */ jsx("tbody", { className: "divide-border/50 divide-y", children: logEntries.map((entry) => /* @__PURE__ */ jsxs(React46.Fragment, { children: [
|
|
15504
15738
|
/* @__PURE__ */ jsxs("tr", { children: [
|
|
15505
15739
|
/* @__PURE__ */ jsx(
|
|
15506
15740
|
"td",
|
|
15507
15741
|
{
|
|
15508
|
-
className: "py-2 text-sm
|
|
15742
|
+
className: "text-muted-foreground py-2 text-sm",
|
|
15509
15743
|
title: formatDate2(entry.createdAt),
|
|
15510
15744
|
children: formatRelativeTime(entry.createdAt)
|
|
15511
15745
|
}
|
|
15512
15746
|
),
|
|
15513
|
-
/* @__PURE__ */ jsx("td", { className: "py-2 text-sm
|
|
15514
|
-
/* @__PURE__ */ jsx("td", { className: "py-2 text-sm
|
|
15747
|
+
/* @__PURE__ */ jsx("td", { className: "text-muted-foreground py-2 text-sm", children: entry.createdBy.name }),
|
|
15748
|
+
/* @__PURE__ */ jsx("td", { className: "text-muted-foreground py-2 text-sm", children: entry.type === "credit" ? "Added" : "Removed" }),
|
|
15515
15749
|
/* @__PURE__ */ jsx("td", { className: "py-2 text-right text-sm", children: /* @__PURE__ */ jsxs(
|
|
15516
15750
|
"span",
|
|
15517
15751
|
{
|
|
@@ -15557,16 +15791,16 @@ function InventoryManager({
|
|
|
15557
15791
|
}
|
|
15558
15792
|
) })
|
|
15559
15793
|
] }),
|
|
15560
|
-
entry.memo && /* @__PURE__ */ jsx("tr", { className: "bg-
|
|
15794
|
+
entry.memo && /* @__PURE__ */ jsx("tr", { className: "bg-muted/50", children: /* @__PURE__ */ jsx("td", { colSpan: 4, className: "px-2 py-1 text-right", children: /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-xs italic", children: [
|
|
15561
15795
|
"Memo: ",
|
|
15562
15796
|
entry.memo
|
|
15563
15797
|
] }) }) })
|
|
15564
15798
|
] }, entry.id)) })
|
|
15565
|
-
] }) }) : /* @__PURE__ */ jsxs("div", { className: "py-8 text-center
|
|
15799
|
+
] }) }) : /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground py-8 text-center", children: [
|
|
15566
15800
|
/* @__PURE__ */ jsx(
|
|
15567
15801
|
"svg",
|
|
15568
15802
|
{
|
|
15569
|
-
className: "mx-auto mb-3 h-12 w-12
|
|
15803
|
+
className: "text-muted-foreground/50 mx-auto mb-3 h-12 w-12",
|
|
15570
15804
|
fill: "none",
|
|
15571
15805
|
viewBox: "0 0 24 24",
|
|
15572
15806
|
stroke: "currentColor",
|
|
@@ -15595,19 +15829,16 @@ function InventoryManager({
|
|
|
15595
15829
|
size: "lg",
|
|
15596
15830
|
children: [
|
|
15597
15831
|
/* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx(ModalTitle, { children: "Inventory Manager" }) }),
|
|
15598
|
-
/* @__PURE__ */ jsxs(
|
|
15599
|
-
/* @__PURE__ */ jsx("div", {
|
|
15600
|
-
/* @__PURE__ */
|
|
15601
|
-
/* @__PURE__ */ jsx("h5", { className: "mb-2 text-sm font-medium text-gray-700 dark:text-gray-300", children: "Update Inventory" }),
|
|
15602
|
-
/* @__PURE__ */ jsx("hr", { className: "mb-3 border-gray-200 dark:border-gray-700" })
|
|
15603
|
-
] }),
|
|
15832
|
+
/* @__PURE__ */ jsxs(ModalBody, { className: "space-y-4", children: [
|
|
15833
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h4", { className: "text-foreground text-lg font-semibold", children: serviceName }) }),
|
|
15834
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h5", { className: "text-muted-foreground mb-2 text-sm font-medium", children: "Update Inventory" }) }),
|
|
15604
15835
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-0", children: [
|
|
15605
15836
|
/* @__PURE__ */ jsxs(
|
|
15606
15837
|
"button",
|
|
15607
15838
|
{
|
|
15608
15839
|
type: "button",
|
|
15609
15840
|
onClick: () => setUpdateType("debit"),
|
|
15610
|
-
className: `rounded-l-md border px-4 py-2 text-sm font-medium ${updateType === "debit" ? "border-
|
|
15841
|
+
className: `rounded-l-md border px-4 py-2 text-sm font-medium transition-colors ${updateType === "debit" ? "border-primary bg-primary text-primary-foreground" : "border-input bg-card text-foreground hover:bg-muted"} `,
|
|
15611
15842
|
children: [
|
|
15612
15843
|
/* @__PURE__ */ jsx(
|
|
15613
15844
|
"svg",
|
|
@@ -15636,7 +15867,7 @@ function InventoryManager({
|
|
|
15636
15867
|
{
|
|
15637
15868
|
type: "button",
|
|
15638
15869
|
onClick: () => setUpdateType("credit"),
|
|
15639
|
-
className: `rounded-r-md border-t border-r border-b px-4 py-2 text-sm font-medium ${updateType === "credit" ? "border-
|
|
15870
|
+
className: `rounded-r-md border-t border-r border-b px-4 py-2 text-sm font-medium transition-colors ${updateType === "credit" ? "border-primary bg-primary text-primary-foreground" : "border-input bg-card text-foreground hover:bg-muted"} `,
|
|
15640
15871
|
children: [
|
|
15641
15872
|
/* @__PURE__ */ jsx(
|
|
15642
15873
|
"svg",
|
|
@@ -15682,9 +15913,9 @@ function InventoryManager({
|
|
|
15682
15913
|
rows: 2
|
|
15683
15914
|
}
|
|
15684
15915
|
),
|
|
15685
|
-
previewChange !== null && updateAmount && /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-
|
|
15686
|
-
/* @__PURE__ */ jsx("h5", { className: "mb-2 text-sm font-medium text-
|
|
15687
|
-
/* @__PURE__ */ jsxs("ul", { className: "list-inside list-disc text-sm text-
|
|
15916
|
+
previewChange !== null && updateAmount && /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-amber-200 bg-amber-50 p-3 dark:border-amber-700 dark:bg-amber-900/20", children: [
|
|
15917
|
+
/* @__PURE__ */ jsx("h5", { className: "mb-2 text-sm font-medium text-amber-800 dark:text-amber-200", children: "Description" }),
|
|
15918
|
+
/* @__PURE__ */ jsxs("ul", { className: "list-inside list-disc text-sm text-amber-700 dark:text-amber-300", children: [
|
|
15688
15919
|
/* @__PURE__ */ jsxs("li", { children: [
|
|
15689
15920
|
"This will",
|
|
15690
15921
|
" ",
|
|
@@ -15760,11 +15991,11 @@ function InviteUserModal({
|
|
|
15760
15991
|
const isValid = email && roleId;
|
|
15761
15992
|
return /* @__PURE__ */ jsx(Modal, { open, onOpenChange, size: "lg", children: /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, children: [
|
|
15762
15993
|
/* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx(ModalTitle, { children: "Invite User" }) }),
|
|
15763
|
-
/* @__PURE__ */ jsxs(
|
|
15764
|
-
entityDisplayName && /* @__PURE__ */ jsx("div", { className: "rounded-lg
|
|
15994
|
+
/* @__PURE__ */ jsxs(ModalBody, { className: "space-y-4", children: [
|
|
15995
|
+
entityDisplayName && /* @__PURE__ */ jsx("div", { className: "bg-muted rounded-lg p-3", children: /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-sm", children: [
|
|
15765
15996
|
"Inviting user to:",
|
|
15766
15997
|
" ",
|
|
15767
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
15998
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground font-medium", children: entityDisplayName })
|
|
15768
15999
|
] }) }),
|
|
15769
16000
|
successMessage && /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-green-200 bg-green-50 p-3 dark:border-green-800 dark:bg-green-900/20", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
15770
16001
|
/* @__PURE__ */ jsx(
|
|
@@ -15861,7 +16092,7 @@ function InviteUserModal({
|
|
|
15861
16092
|
"label",
|
|
15862
16093
|
{
|
|
15863
16094
|
htmlFor: "invite-message",
|
|
15864
|
-
className: "mb-1 block text-sm font-medium
|
|
16095
|
+
className: "text-foreground mb-1 block text-sm font-medium",
|
|
15865
16096
|
children: "Personal Message (optional)"
|
|
15866
16097
|
}
|
|
15867
16098
|
),
|
|
@@ -15869,7 +16100,7 @@ function InviteUserModal({
|
|
|
15869
16100
|
"textarea",
|
|
15870
16101
|
{
|
|
15871
16102
|
id: "invite-message",
|
|
15872
|
-
className: "w-full rounded-md border
|
|
16103
|
+
className: "border-input bg-background text-foreground focus:ring-primary w-full rounded-md border px-3 py-2 shadow-sm focus:ring-2 focus:outline-none",
|
|
15873
16104
|
rows: 3,
|
|
15874
16105
|
value: message,
|
|
15875
16106
|
onChange: (e) => setMessage(e.target.value),
|
|
@@ -15877,7 +16108,7 @@ function InviteUserModal({
|
|
|
15877
16108
|
}
|
|
15878
16109
|
)
|
|
15879
16110
|
] }),
|
|
15880
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
16111
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: "An email invitation will be sent to this address. If the user doesn't have an account, they'll be prompted to create one." })
|
|
15881
16112
|
] }),
|
|
15882
16113
|
/* @__PURE__ */ jsxs(ModalFooter, { children: [
|
|
15883
16114
|
/* @__PURE__ */ jsx(
|
|
@@ -18485,7 +18716,7 @@ function OnboardingWizard({
|
|
|
18485
18716
|
onStepChange,
|
|
18486
18717
|
onComplete,
|
|
18487
18718
|
onSkip,
|
|
18488
|
-
logoUrl = "/
|
|
18719
|
+
logoUrl = "https://mieweb.org/wp-content/uploads/2024/03/MIE-NEW-1.png",
|
|
18489
18720
|
brandName = "BlueHive",
|
|
18490
18721
|
brandSubname = "for employers",
|
|
18491
18722
|
loading = false,
|
|
@@ -18531,7 +18762,7 @@ function OnboardingWizard({
|
|
|
18531
18762
|
"div",
|
|
18532
18763
|
{
|
|
18533
18764
|
className: cn(
|
|
18534
|
-
"onboarding-wizard fixed inset-0 z-50 flex flex-col
|
|
18765
|
+
"onboarding-wizard bg-background text-foreground fixed inset-0 z-50 flex flex-col",
|
|
18535
18766
|
className
|
|
18536
18767
|
),
|
|
18537
18768
|
children: [
|
|
@@ -18546,78 +18777,55 @@ function OnboardingWizard({
|
|
|
18546
18777
|
headerContent
|
|
18547
18778
|
] }),
|
|
18548
18779
|
loading ? /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col items-center justify-center", children: [
|
|
18549
|
-
/* @__PURE__ */ jsx(
|
|
18780
|
+
/* @__PURE__ */ jsx(Spinner, { size: "xl" }),
|
|
18550
18781
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-4 text-center text-lg", children: loadingMessage })
|
|
18551
18782
|
] }) : /* @__PURE__ */ jsxs("div", { className: "container mx-auto flex flex-1 flex-col p-4", children: [
|
|
18552
|
-
error && /* @__PURE__ */ jsx(
|
|
18783
|
+
error && /* @__PURE__ */ jsx(Alert, { variant: "danger", className: "mb-4", children: error }),
|
|
18553
18784
|
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: currentStepData?.content }),
|
|
18554
|
-
/* @__PURE__ */ jsxs("div", { className: "mt-auto border-t pt-4", children: [
|
|
18785
|
+
/* @__PURE__ */ jsxs("div", { className: "border-border mt-auto border-t pt-4", children: [
|
|
18555
18786
|
!isLastStep && currentStepData?.skippable !== false && /* @__PURE__ */ jsx("div", { className: "mb-3 flex justify-end", children: /* @__PURE__ */ jsx(
|
|
18556
|
-
|
|
18787
|
+
Button,
|
|
18557
18788
|
{
|
|
18558
|
-
|
|
18789
|
+
variant: "secondary",
|
|
18790
|
+
size: "sm",
|
|
18559
18791
|
onClick: handleSkip,
|
|
18560
|
-
className: "rounded-full
|
|
18792
|
+
className: "rounded-full",
|
|
18561
18793
|
children: skip
|
|
18562
18794
|
}
|
|
18563
18795
|
) }),
|
|
18564
|
-
/* @__PURE__ */ jsxs("div", { className: "flex w-full items-center gap-4
|
|
18565
|
-
|
|
18566
|
-
|
|
18796
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-background flex w-full items-center gap-4", children: [
|
|
18797
|
+
/* @__PURE__ */ jsxs(
|
|
18798
|
+
Button,
|
|
18567
18799
|
{
|
|
18568
|
-
|
|
18800
|
+
variant: "outline",
|
|
18569
18801
|
onClick: handleBack,
|
|
18570
|
-
|
|
18802
|
+
disabled: !backEnabled || isFirstStep,
|
|
18571
18803
|
children: [
|
|
18572
18804
|
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: back }),
|
|
18573
18805
|
/* @__PURE__ */ jsx("i", { className: "fas fa-chevron-left sm:hidden" })
|
|
18574
18806
|
]
|
|
18575
18807
|
}
|
|
18576
|
-
) : /* @__PURE__ */ jsx("div", {}),
|
|
18577
|
-
/* @__PURE__ */ jsx(
|
|
18578
|
-
"div",
|
|
18579
|
-
{
|
|
18580
|
-
className: "flex-1",
|
|
18581
|
-
role: "progressbar",
|
|
18582
|
-
"aria-label": `Step ${currentStep + 1} of ${totalSteps}`,
|
|
18583
|
-
"aria-valuenow": progressPercent,
|
|
18584
|
-
"aria-valuemin": 0,
|
|
18585
|
-
"aria-valuemax": 100,
|
|
18586
|
-
children: /* @__PURE__ */ jsx("div", { className: "h-5 w-full overflow-hidden rounded-full bg-gray-200", children: /* @__PURE__ */ jsxs(
|
|
18587
|
-
"div",
|
|
18588
|
-
{
|
|
18589
|
-
className: "flex h-full items-center justify-center bg-green-500 text-xs font-medium text-white transition-all duration-300",
|
|
18590
|
-
style: { width: `${progressPercent}%` },
|
|
18591
|
-
children: [
|
|
18592
|
-
currentStep + 1,
|
|
18593
|
-
" of ",
|
|
18594
|
-
totalSteps
|
|
18595
|
-
]
|
|
18596
|
-
}
|
|
18597
|
-
) })
|
|
18598
|
-
}
|
|
18599
18808
|
),
|
|
18600
|
-
|
|
18601
|
-
|
|
18809
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx(
|
|
18810
|
+
Progress,
|
|
18602
18811
|
{
|
|
18603
|
-
|
|
18604
|
-
|
|
18605
|
-
|
|
18606
|
-
|
|
18812
|
+
value: progressPercent,
|
|
18813
|
+
size: "lg",
|
|
18814
|
+
variant: "success",
|
|
18815
|
+
showValue: true,
|
|
18816
|
+
formatValue: () => `${currentStep + 1} of ${totalSteps}`,
|
|
18817
|
+
label: `Step ${currentStep + 1} of ${totalSteps}`
|
|
18607
18818
|
}
|
|
18608
|
-
)
|
|
18609
|
-
|
|
18819
|
+
) }),
|
|
18820
|
+
/* @__PURE__ */ jsxs(
|
|
18821
|
+
Button,
|
|
18610
18822
|
{
|
|
18611
|
-
|
|
18823
|
+
variant: "primary",
|
|
18612
18824
|
onClick: handleNext,
|
|
18613
|
-
disabled: !nextEnabled,
|
|
18614
|
-
className: cn(
|
|
18615
|
-
"rounded-lg px-6 py-3 text-white",
|
|
18616
|
-
nextEnabled ? "bg-primary hover:bg-primary/90" : "cursor-not-allowed bg-gray-300"
|
|
18617
|
-
),
|
|
18825
|
+
disabled: !nextEnabled && !isLastStep,
|
|
18618
18826
|
children: [
|
|
18619
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: next }),
|
|
18620
|
-
/* @__PURE__ */ jsx("i", { className: "fas fa-chevron-right sm:hidden" })
|
|
18827
|
+
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: isLastStep ? finish : next }),
|
|
18828
|
+
!isLastStep && /* @__PURE__ */ jsx("i", { className: "fas fa-chevron-right sm:hidden" })
|
|
18621
18829
|
]
|
|
18622
18830
|
}
|
|
18623
18831
|
)
|
|
@@ -18639,21 +18847,18 @@ function OnboardingStepQuestion({
|
|
|
18639
18847
|
}) {
|
|
18640
18848
|
return /* @__PURE__ */ jsxs("div", { className: "py-4", children: [
|
|
18641
18849
|
/* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-start gap-3", children: [
|
|
18642
|
-
icon && /* @__PURE__ */ jsx("div", { className: "hidden rounded-full
|
|
18850
|
+
icon && /* @__PURE__ */ jsx("div", { className: "bg-muted text-muted-foreground hidden rounded-full p-3", children: /* @__PURE__ */ jsx("i", { className: cn(icon, "text-lg") }) }),
|
|
18643
18851
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
18644
|
-
/* @__PURE__ */ jsx("h3", { className: "mb-2 text-2xl font-bold", children: title }),
|
|
18852
|
+
/* @__PURE__ */ jsx("h3", { className: "text-foreground mb-2 text-2xl font-bold", children: title }),
|
|
18645
18853
|
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: description })
|
|
18646
18854
|
] })
|
|
18647
18855
|
] }),
|
|
18648
18856
|
options.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: options.map((option) => /* @__PURE__ */ jsxs(
|
|
18649
|
-
|
|
18857
|
+
Button,
|
|
18650
18858
|
{
|
|
18651
|
-
|
|
18859
|
+
variant: option.selected ? "primary" : "outline",
|
|
18652
18860
|
onClick: () => onSelect?.(option.id),
|
|
18653
|
-
className:
|
|
18654
|
-
"rounded-full border-2 px-4 py-2 transition-colors",
|
|
18655
|
-
option.selected ? "border-primary bg-primary text-white" : "hover:border-primary border-gray-300 bg-white text-gray-700"
|
|
18656
|
-
),
|
|
18861
|
+
className: "rounded-full",
|
|
18657
18862
|
children: [
|
|
18658
18863
|
option.icon && /* @__PURE__ */ jsx("i", { className: cn(option.icon, "mr-2") }),
|
|
18659
18864
|
option.label
|
|
@@ -18675,63 +18880,39 @@ function OnboardingCompletion({
|
|
|
18675
18880
|
if (completed) {
|
|
18676
18881
|
return /* @__PURE__ */ jsxs("div", { className: "py-4", children: [
|
|
18677
18882
|
/* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
18678
|
-
/* @__PURE__ */ jsxs("p", { className: "mb-0 text-2xl", children: [
|
|
18883
|
+
/* @__PURE__ */ jsxs("p", { className: "text-foreground mb-0 text-2xl", children: [
|
|
18679
18884
|
/* @__PURE__ */ jsx("i", { className: "fas fa-check-circle mr-2 text-green-500" }),
|
|
18680
18885
|
"Setup complete!"
|
|
18681
18886
|
] }),
|
|
18682
18887
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "You're all set up! You can now start using BlueHive to manage your employees." })
|
|
18683
18888
|
] }),
|
|
18684
18889
|
/* @__PURE__ */ jsxs("div", { className: "my-6 flex flex-wrap gap-3", children: [
|
|
18685
|
-
/* @__PURE__ */ jsxs(
|
|
18686
|
-
"
|
|
18687
|
-
|
|
18688
|
-
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
|
|
18693
|
-
|
|
18694
|
-
|
|
18695
|
-
|
|
18696
|
-
)
|
|
18697
|
-
/* @__PURE__ */ jsxs(
|
|
18698
|
-
"button",
|
|
18699
|
-
{
|
|
18700
|
-
type: "button",
|
|
18701
|
-
onClick: onGoToDashboard,
|
|
18702
|
-
className: "rounded-lg border border-gray-300 px-4 py-2 text-gray-700 hover:bg-gray-50",
|
|
18703
|
-
children: [
|
|
18704
|
-
/* @__PURE__ */ jsx("i", { className: "fas fa-tachometer-alt mr-2" }),
|
|
18705
|
-
"Go to Dashboard"
|
|
18706
|
-
]
|
|
18707
|
-
}
|
|
18708
|
-
),
|
|
18709
|
-
/* @__PURE__ */ jsxs(
|
|
18710
|
-
"button",
|
|
18711
|
-
{
|
|
18712
|
-
type: "button",
|
|
18713
|
-
onClick: onGoToEmployees,
|
|
18714
|
-
className: "rounded-lg border border-gray-300 px-4 py-2 text-gray-700 hover:bg-gray-50",
|
|
18715
|
-
children: [
|
|
18716
|
-
/* @__PURE__ */ jsx("i", { className: "fas fa-users mr-2" }),
|
|
18717
|
-
"Go to Employees"
|
|
18718
|
-
]
|
|
18719
|
-
}
|
|
18720
|
-
)
|
|
18890
|
+
/* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: onStartOrder, children: [
|
|
18891
|
+
/* @__PURE__ */ jsx("i", { className: "fas fa-shopping-cart mr-2" }),
|
|
18892
|
+
"Start your first order"
|
|
18893
|
+
] }),
|
|
18894
|
+
/* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: onGoToDashboard, children: [
|
|
18895
|
+
/* @__PURE__ */ jsx("i", { className: "fas fa-tachometer-alt mr-2" }),
|
|
18896
|
+
"Go to Dashboard"
|
|
18897
|
+
] }),
|
|
18898
|
+
/* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: onGoToEmployees, children: [
|
|
18899
|
+
/* @__PURE__ */ jsx("i", { className: "fas fa-users mr-2" }),
|
|
18900
|
+
"Go to Employees"
|
|
18901
|
+
] })
|
|
18721
18902
|
] })
|
|
18722
18903
|
] });
|
|
18723
18904
|
}
|
|
18724
18905
|
return /* @__PURE__ */ jsxs("div", { className: "py-4", children: [
|
|
18725
18906
|
/* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
18726
|
-
/* @__PURE__ */ jsx("h3", { className: "mb-2 text-2xl font-bold", children: "Some steps not completed" }),
|
|
18907
|
+
/* @__PURE__ */ jsx("h3", { className: "text-foreground mb-2 text-2xl font-bold", children: "Some steps not completed" }),
|
|
18727
18908
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "You still need to complete some steps to finish the full guided onboarding. If you're in a hurry, you can skip them for now and come back later." })
|
|
18728
18909
|
] }),
|
|
18729
18910
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-3", children: incompleteSteps.map(({ step, label }) => /* @__PURE__ */ jsxs(
|
|
18730
|
-
|
|
18911
|
+
Button,
|
|
18731
18912
|
{
|
|
18732
|
-
|
|
18913
|
+
variant: "outline",
|
|
18733
18914
|
onClick: () => onGoToStep?.(step),
|
|
18734
|
-
className: "
|
|
18915
|
+
className: "rounded-full",
|
|
18735
18916
|
children: [
|
|
18736
18917
|
"Step ",
|
|
18737
18918
|
step,
|
|
@@ -18822,13 +19003,13 @@ function OrderCard({
|
|
|
18822
19003
|
return /* @__PURE__ */ jsx(
|
|
18823
19004
|
Card,
|
|
18824
19005
|
{
|
|
18825
|
-
className: `transition-all duration-200 ${onClick ? "cursor-pointer hover:shadow-md" : ""} ${selected ? "ring-
|
|
19006
|
+
className: `transition-all duration-200 ${onClick ? "cursor-pointer hover:shadow-md" : ""} ${selected ? "ring-primary ring-2" : ""} ${className} `.trim(),
|
|
18826
19007
|
onClick: onClick ? handleCardClick : void 0,
|
|
18827
19008
|
children: /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
|
|
18828
19009
|
/* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-start justify-between gap-4", children: [
|
|
18829
19010
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
18830
19011
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
18831
|
-
/* @__PURE__ */ jsxs("span", { className: "
|
|
19012
|
+
/* @__PURE__ */ jsxs("span", { className: "text-foreground font-semibold", children: [
|
|
18832
19013
|
"#",
|
|
18833
19014
|
orderNumber
|
|
18834
19015
|
] }),
|
|
@@ -18837,30 +19018,33 @@ function OrderCard({
|
|
|
18837
19018
|
/* @__PURE__ */ jsx(
|
|
18838
19019
|
"p",
|
|
18839
19020
|
{
|
|
18840
|
-
className: "mt-1 text-sm
|
|
19021
|
+
className: "text-muted-foreground mt-1 text-sm",
|
|
18841
19022
|
title: formatDate3(createdAt),
|
|
18842
19023
|
children: formatRelativeTime2(createdAt)
|
|
18843
19024
|
}
|
|
18844
19025
|
)
|
|
18845
19026
|
] }),
|
|
18846
|
-
totalAmount !== void 0 && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ jsx("p", { className: "
|
|
19027
|
+
totalAmount !== void 0 && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ jsx("p", { className: "text-foreground font-semibold", children: formatCurrency(totalAmount, currency) }) })
|
|
18847
19028
|
] }),
|
|
18848
19029
|
/* @__PURE__ */ jsx("div", { className: "mb-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
18849
|
-
/* @__PURE__ */ jsx(
|
|
18850
|
-
|
|
18851
|
-
|
|
18852
|
-
|
|
19030
|
+
/* @__PURE__ */ jsx(
|
|
19031
|
+
Avatar,
|
|
19032
|
+
{
|
|
19033
|
+
name: `${employee.firstName} ${employee.lastName}`,
|
|
19034
|
+
size: "sm"
|
|
19035
|
+
}
|
|
19036
|
+
),
|
|
18853
19037
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
18854
|
-
/* @__PURE__ */ jsxs("p", { className: "truncate font-medium
|
|
19038
|
+
/* @__PURE__ */ jsxs("p", { className: "text-foreground truncate font-medium", children: [
|
|
18855
19039
|
employee.firstName,
|
|
18856
19040
|
" ",
|
|
18857
19041
|
employee.lastName
|
|
18858
19042
|
] }),
|
|
18859
|
-
employer && /* @__PURE__ */ jsx("p", { className: "
|
|
19043
|
+
employer && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground truncate text-sm", children: employer.name })
|
|
18860
19044
|
] })
|
|
18861
19045
|
] }) }),
|
|
18862
19046
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
18863
|
-
/* @__PURE__ */ jsxs("p", { className: "mb-1 text-xs font-medium tracking-wider
|
|
19047
|
+
/* @__PURE__ */ jsxs("p", { className: "text-muted-foreground mb-1 text-xs font-medium tracking-wider uppercase", children: [
|
|
18864
19048
|
"Services (",
|
|
18865
19049
|
services.length,
|
|
18866
19050
|
")"
|
|
@@ -18869,19 +19053,19 @@ function OrderCard({
|
|
|
18869
19053
|
services.slice(0, 3).map((service) => /* @__PURE__ */ jsx(
|
|
18870
19054
|
"span",
|
|
18871
19055
|
{
|
|
18872
|
-
className: "inline-flex items-center rounded
|
|
19056
|
+
className: "bg-muted text-foreground inline-flex items-center rounded px-2 py-0.5 text-xs font-medium",
|
|
18873
19057
|
children: service.name
|
|
18874
19058
|
},
|
|
18875
19059
|
service.id
|
|
18876
19060
|
)),
|
|
18877
|
-
services.length > 3 && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center rounded
|
|
19061
|
+
services.length > 3 && /* @__PURE__ */ jsxs("span", { className: "bg-muted text-muted-foreground inline-flex items-center rounded px-2 py-0.5 text-xs font-medium", children: [
|
|
18878
19062
|
"+",
|
|
18879
19063
|
services.length - 3,
|
|
18880
19064
|
" more"
|
|
18881
19065
|
] })
|
|
18882
19066
|
] })
|
|
18883
19067
|
] }),
|
|
18884
|
-
scheduledDate && /* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-center gap-2 text-sm
|
|
19068
|
+
scheduledDate && /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground mb-3 flex items-center gap-2 text-sm", children: [
|
|
18885
19069
|
/* @__PURE__ */ jsx(
|
|
18886
19070
|
"svg",
|
|
18887
19071
|
{
|
|
@@ -18905,18 +19089,18 @@ function OrderCard({
|
|
|
18905
19089
|
formatDate3(scheduledDate)
|
|
18906
19090
|
] })
|
|
18907
19091
|
] }),
|
|
18908
|
-
status === "rejected" && rejectionReason && /* @__PURE__ */ jsxs("div", { className: "mb-3 rounded
|
|
19092
|
+
status === "rejected" && rejectionReason && /* @__PURE__ */ jsxs("div", { className: "bg-destructive/10 text-destructive mb-3 rounded p-2 text-sm", children: [
|
|
18909
19093
|
/* @__PURE__ */ jsx("span", { className: "font-medium", children: "Reason:" }),
|
|
18910
19094
|
" ",
|
|
18911
19095
|
rejectionReason
|
|
18912
19096
|
] }),
|
|
18913
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-t
|
|
19097
|
+
/* @__PURE__ */ jsxs("div", { className: "border-border flex items-center justify-between border-t pt-3", children: [
|
|
18914
19098
|
onView && /* @__PURE__ */ jsx(
|
|
18915
19099
|
"button",
|
|
18916
19100
|
{
|
|
18917
19101
|
type: "button",
|
|
18918
19102
|
onClick: handleViewClick,
|
|
18919
|
-
className: "text-
|
|
19103
|
+
className: "text-primary hover:text-primary/80 text-sm font-medium",
|
|
18920
19104
|
children: "View Details"
|
|
18921
19105
|
}
|
|
18922
19106
|
),
|
|
@@ -18926,7 +19110,7 @@ function OrderCard({
|
|
|
18926
19110
|
{
|
|
18927
19111
|
type: "button",
|
|
18928
19112
|
onClick: handleRejectClick,
|
|
18929
|
-
className: "rounded-md px-3 py-1.5 text-sm font-medium
|
|
19113
|
+
className: "text-destructive hover:bg-destructive/10 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",
|
|
18930
19114
|
children: "Reject"
|
|
18931
19115
|
}
|
|
18932
19116
|
),
|
|
@@ -18935,7 +19119,7 @@ function OrderCard({
|
|
|
18935
19119
|
{
|
|
18936
19120
|
type: "button",
|
|
18937
19121
|
onClick: handleAcceptClick,
|
|
18938
|
-
className: "
|
|
19122
|
+
className: "bg-primary hover:bg-primary/90 rounded-md px-3 py-1.5 text-sm font-medium text-white transition-colors",
|
|
18939
19123
|
children: "Accept"
|
|
18940
19124
|
}
|
|
18941
19125
|
)
|
|
@@ -19417,8 +19601,8 @@ function OrderList({
|
|
|
19417
19601
|
});
|
|
19418
19602
|
return counts;
|
|
19419
19603
|
}, [orders, tabs, getOrderStatus]);
|
|
19420
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col", className), children: [
|
|
19421
|
-
/* @__PURE__ */ jsx("div", { className: "border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 px-4
|
|
19604
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex h-full flex-col", className), children: [
|
|
19605
|
+
/* @__PURE__ */ jsx("div", { className: "border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 px-4 py-4 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
19422
19606
|
/* @__PURE__ */ jsx("div", { className: "flex gap-1 overflow-x-auto", children: tabs.map((tab) => {
|
|
19423
19607
|
const count = tab.count ?? tabCounts[tab.id];
|
|
19424
19608
|
return /* @__PURE__ */ jsxs(
|
|
@@ -19567,18 +19751,27 @@ function OrderLookupForm({
|
|
|
19567
19751
|
};
|
|
19568
19752
|
const isValid = formData.orderNumber.trim() && formData.dateOfBirth.trim() && formData.lastName.trim();
|
|
19569
19753
|
return /* @__PURE__ */ jsxs("div", { className: `flex min-h-screen flex-col md:flex-row ${className}`, children: [
|
|
19570
|
-
/* @__PURE__ */ jsxs(
|
|
19571
|
-
|
|
19572
|
-
|
|
19573
|
-
|
|
19574
|
-
|
|
19575
|
-
|
|
19576
|
-
|
|
19577
|
-
|
|
19578
|
-
|
|
19579
|
-
|
|
19580
|
-
|
|
19581
|
-
|
|
19754
|
+
/* @__PURE__ */ jsxs(
|
|
19755
|
+
"div",
|
|
19756
|
+
{
|
|
19757
|
+
className: "flex flex-col items-center justify-center p-8 text-white md:w-1/2",
|
|
19758
|
+
style: {
|
|
19759
|
+
background: "linear-gradient(to bottom right, var(--mieweb-primary-600, #1f98ca), var(--mieweb-primary-900, #086285))"
|
|
19760
|
+
},
|
|
19761
|
+
children: [
|
|
19762
|
+
providerLogo ? /* @__PURE__ */ jsx(
|
|
19763
|
+
"img",
|
|
19764
|
+
{
|
|
19765
|
+
src: providerLogo,
|
|
19766
|
+
alt: providerName || "Provider",
|
|
19767
|
+
className: "mb-6 max-h-[100px] max-w-[200px] object-contain"
|
|
19768
|
+
}
|
|
19769
|
+
) : /* @__PURE__ */ jsx("div", { className: "mb-6 flex h-20 w-20 items-center justify-center rounded-full bg-white/20", children: /* @__PURE__ */ jsx("svg", { className: "h-10 w-10", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" }) }) }),
|
|
19770
|
+
providerName && /* @__PURE__ */ jsx("h1", { className: "mb-2 text-center text-2xl font-bold", children: providerName }),
|
|
19771
|
+
/* @__PURE__ */ jsx("p", { className: "max-w-xs text-center text-blue-100", children: welcomeMessage })
|
|
19772
|
+
]
|
|
19773
|
+
}
|
|
19774
|
+
),
|
|
19582
19775
|
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center bg-white p-8 md:w-1/2 dark:bg-gray-900", children: /* @__PURE__ */ jsxs("div", { className: "w-full max-w-md", children: [
|
|
19583
19776
|
/* @__PURE__ */ jsx("h2", { className: "mb-2 text-2xl font-bold text-gray-900 dark:text-white", children: "Order Lookup" }),
|
|
19584
19777
|
/* @__PURE__ */ jsx("p", { className: "mb-6 text-gray-600 dark:text-gray-400", children: "Enter your order details to view your information." }),
|
|
@@ -19841,6 +20034,7 @@ function PageHeader({
|
|
|
19841
20034
|
title,
|
|
19842
20035
|
subtitle,
|
|
19843
20036
|
icon,
|
|
20037
|
+
iconAlign = "center",
|
|
19844
20038
|
actions,
|
|
19845
20039
|
children,
|
|
19846
20040
|
className = "",
|
|
@@ -19862,22 +20056,40 @@ function PageHeader({
|
|
|
19862
20056
|
{
|
|
19863
20057
|
className: ` ${sizeClasses2[size]} ${bordered ? "border-b border-gray-200 dark:border-gray-700" : ""} ${className} `.trim(),
|
|
19864
20058
|
children: [
|
|
19865
|
-
/* @__PURE__ */ jsxs(
|
|
19866
|
-
|
|
19867
|
-
|
|
19868
|
-
|
|
19869
|
-
|
|
19870
|
-
|
|
20059
|
+
/* @__PURE__ */ jsxs(
|
|
20060
|
+
"div",
|
|
20061
|
+
{
|
|
20062
|
+
className: `flex justify-between gap-4 ${iconAlign === "top" ? "items-start" : "items-center"}`,
|
|
20063
|
+
children: [
|
|
20064
|
+
/* @__PURE__ */ jsxs(
|
|
20065
|
+
"div",
|
|
19871
20066
|
{
|
|
19872
|
-
className:
|
|
19873
|
-
children:
|
|
20067
|
+
className: `flex min-w-0 gap-3 ${iconAlign === "top" ? "items-start" : "items-center"}`,
|
|
20068
|
+
children: [
|
|
20069
|
+
icon && /* @__PURE__ */ jsx(
|
|
20070
|
+
"div",
|
|
20071
|
+
{
|
|
20072
|
+
className: `flex-shrink-0 text-gray-500 dark:text-gray-400 ${iconAlign === "top" ? "mt-1" : ""}`,
|
|
20073
|
+
children: icon
|
|
20074
|
+
}
|
|
20075
|
+
),
|
|
20076
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
20077
|
+
/* @__PURE__ */ jsx(
|
|
20078
|
+
"h1",
|
|
20079
|
+
{
|
|
20080
|
+
className: `${titleSizeClasses[size]} truncate text-gray-900 dark:text-white`,
|
|
20081
|
+
children: title
|
|
20082
|
+
}
|
|
20083
|
+
),
|
|
20084
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "mt-1 truncate text-sm text-gray-500 dark:text-gray-400", children: subtitle })
|
|
20085
|
+
] })
|
|
20086
|
+
]
|
|
19874
20087
|
}
|
|
19875
20088
|
),
|
|
19876
|
-
|
|
19877
|
-
]
|
|
19878
|
-
|
|
19879
|
-
|
|
19880
|
-
] }),
|
|
20089
|
+
actions && /* @__PURE__ */ jsx("div", { className: "flex flex-shrink-0 items-center gap-2", children: actions })
|
|
20090
|
+
]
|
|
20091
|
+
}
|
|
20092
|
+
),
|
|
19881
20093
|
children && /* @__PURE__ */ jsx("div", { className: "mt-4", children })
|
|
19882
20094
|
]
|
|
19883
20095
|
}
|
|
@@ -23789,7 +24001,7 @@ function ProviderSelector({
|
|
|
23789
24001
|
return name.split(" ").map((word) => word[0]).join("").substring(0, 2).toUpperCase();
|
|
23790
24002
|
};
|
|
23791
24003
|
return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), ref: containerRef, children: [
|
|
23792
|
-
label && /* @__PURE__ */ jsx("label", { className: "mb-1 block text-sm font-medium
|
|
24004
|
+
label && /* @__PURE__ */ jsx("label", { className: "text-foreground mb-1 block text-sm font-medium", children: label }),
|
|
23793
24005
|
/* @__PURE__ */ jsxs(
|
|
23794
24006
|
"button",
|
|
23795
24007
|
{
|
|
@@ -23797,10 +24009,11 @@ function ProviderSelector({
|
|
|
23797
24009
|
onClick: () => !disabled && setIsOpen(!isOpen),
|
|
23798
24010
|
disabled,
|
|
23799
24011
|
className: cn(
|
|
23800
|
-
"flex w-full items-center gap-3 rounded-lg border
|
|
23801
|
-
"
|
|
23802
|
-
"
|
|
23803
|
-
"
|
|
24012
|
+
"flex w-full items-center gap-3 rounded-lg border px-3 text-left transition-colors",
|
|
24013
|
+
"bg-background text-foreground",
|
|
24014
|
+
"border-input",
|
|
24015
|
+
"hover:border-muted-foreground/50",
|
|
24016
|
+
"focus:ring-ring focus:border-transparent focus:ring-2 focus:outline-none",
|
|
23804
24017
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
23805
24018
|
sizeStyles[size]
|
|
23806
24019
|
),
|
|
@@ -23809,7 +24022,7 @@ function ProviderSelector({
|
|
|
23809
24022
|
/* @__PURE__ */ jsxs(
|
|
23810
24023
|
"svg",
|
|
23811
24024
|
{
|
|
23812
|
-
className: "h-5 w-5 animate-spin
|
|
24025
|
+
className: "text-muted-foreground h-5 w-5 animate-spin",
|
|
23813
24026
|
fill: "none",
|
|
23814
24027
|
viewBox: "0 0 24 24",
|
|
23815
24028
|
children: [
|
|
@@ -23835,7 +24048,7 @@ function ProviderSelector({
|
|
|
23835
24048
|
]
|
|
23836
24049
|
}
|
|
23837
24050
|
),
|
|
23838
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
24051
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Loading..." })
|
|
23839
24052
|
] }) : selectedProvider ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23840
24053
|
selectedProvider.logoUrl ? /* @__PURE__ */ jsx(
|
|
23841
24054
|
"img",
|
|
@@ -23844,17 +24057,17 @@ function ProviderSelector({
|
|
|
23844
24057
|
alt: selectedProvider.name,
|
|
23845
24058
|
className: "h-6 w-6 rounded object-cover"
|
|
23846
24059
|
}
|
|
23847
|
-
) : /* @__PURE__ */ jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded
|
|
23848
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
23849
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
23850
|
-
selectedProvider.location && /* @__PURE__ */ jsx("div", { className: "
|
|
24060
|
+
) : /* @__PURE__ */ jsx("div", { className: "bg-primary/10 text-primary flex h-6 w-6 items-center justify-center rounded text-xs font-medium", children: getInitials3(selectedProvider.name) }),
|
|
24061
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 leading-tight", children: [
|
|
24062
|
+
/* @__PURE__ */ jsx("div", { className: "text-foreground truncate text-sm", children: selectedProvider.name }),
|
|
24063
|
+
selectedProvider.location && /* @__PURE__ */ jsx("div", { className: "text-muted-foreground truncate text-[11px]", children: selectedProvider.location })
|
|
23851
24064
|
] })
|
|
23852
|
-
] }) : /* @__PURE__ */ jsx("span", { className: "
|
|
24065
|
+
] }) : /* @__PURE__ */ jsx("span", { className: "text-muted-foreground flex-1", children: placeholder }),
|
|
23853
24066
|
/* @__PURE__ */ jsx(
|
|
23854
24067
|
"svg",
|
|
23855
24068
|
{
|
|
23856
24069
|
className: cn(
|
|
23857
|
-
"h-4 w-4 flex-shrink-0
|
|
24070
|
+
"text-muted-foreground h-4 w-4 flex-shrink-0 transition-transform",
|
|
23858
24071
|
isOpen && "rotate-180"
|
|
23859
24072
|
),
|
|
23860
24073
|
fill: "none",
|
|
@@ -23874,12 +24087,12 @@ function ProviderSelector({
|
|
|
23874
24087
|
]
|
|
23875
24088
|
}
|
|
23876
24089
|
),
|
|
23877
|
-
isOpen && /* @__PURE__ */ jsxs("div", { className: "absolute z-50 mt-1 w-full overflow-hidden rounded-lg border
|
|
23878
|
-
searchable && /* @__PURE__ */ jsx("div", { className: "border-
|
|
24090
|
+
isOpen && /* @__PURE__ */ jsxs("div", { className: "border-border bg-card absolute z-50 mt-1 w-full overflow-hidden rounded-lg border shadow-lg", children: [
|
|
24091
|
+
searchable && /* @__PURE__ */ jsx("div", { className: "border-border border-b p-2", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
23879
24092
|
/* @__PURE__ */ jsx(
|
|
23880
24093
|
"svg",
|
|
23881
24094
|
{
|
|
23882
|
-
className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2
|
|
24095
|
+
className: "text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2",
|
|
23883
24096
|
fill: "none",
|
|
23884
24097
|
viewBox: "0 0 24 24",
|
|
23885
24098
|
stroke: "currentColor",
|
|
@@ -23901,20 +24114,20 @@ function ProviderSelector({
|
|
|
23901
24114
|
placeholder: searchPlaceholder,
|
|
23902
24115
|
value: searchQuery,
|
|
23903
24116
|
onChange: (e) => setSearchQuery(e.target.value),
|
|
23904
|
-
className: "w-full rounded-md border
|
|
24117
|
+
className: "border-input bg-background text-foreground placeholder:text-muted-foreground focus:ring-ring w-full rounded-md border py-2 pr-4 pl-9 text-sm focus:ring-1 focus:outline-none",
|
|
23905
24118
|
autoFocus: true
|
|
23906
24119
|
}
|
|
23907
24120
|
)
|
|
23908
24121
|
] }) }),
|
|
23909
|
-
/* @__PURE__ */ jsx("div", { className: "max-h-64 overflow-y-auto", children: filteredProviders.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-4 py-6 text-center
|
|
24122
|
+
/* @__PURE__ */ jsx("div", { className: "max-h-64 overflow-y-auto", children: filteredProviders.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-muted-foreground px-4 py-6 text-center", children: "No providers found" }) : filteredProviders.map((provider) => /* @__PURE__ */ jsxs(
|
|
23910
24123
|
"button",
|
|
23911
24124
|
{
|
|
23912
24125
|
type: "button",
|
|
23913
24126
|
onClick: () => handleSelect(provider),
|
|
23914
24127
|
className: cn(
|
|
23915
24128
|
"flex w-full items-center gap-3 px-4 py-3 text-left transition-colors",
|
|
23916
|
-
"hover:bg-
|
|
23917
|
-
selectedProvider?.id === provider.id && "bg-
|
|
24129
|
+
"hover:bg-muted",
|
|
24130
|
+
selectedProvider?.id === provider.id && "bg-primary/10"
|
|
23918
24131
|
),
|
|
23919
24132
|
children: [
|
|
23920
24133
|
provider.logoUrl ? /* @__PURE__ */ jsx(
|
|
@@ -23924,23 +24137,23 @@ function ProviderSelector({
|
|
|
23924
24137
|
alt: provider.name,
|
|
23925
24138
|
className: "h-8 w-8 rounded object-cover"
|
|
23926
24139
|
}
|
|
23927
|
-
) : /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded
|
|
24140
|
+
) : /* @__PURE__ */ jsx("div", { className: "bg-muted text-muted-foreground flex h-8 w-8 items-center justify-center rounded text-sm font-medium", children: getInitials3(provider.name) }),
|
|
23928
24141
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
23929
24142
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
23930
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
23931
|
-
provider.code && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
24143
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground font-medium", children: provider.name }),
|
|
24144
|
+
provider.code && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-xs", children: [
|
|
23932
24145
|
"(",
|
|
23933
24146
|
provider.code,
|
|
23934
24147
|
")"
|
|
23935
24148
|
] }),
|
|
23936
|
-
provider.isActive === false && /* @__PURE__ */ jsx("span", { className: "
|
|
24149
|
+
provider.isActive === false && /* @__PURE__ */ jsx("span", { className: "bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-xs font-medium", children: "Inactive" })
|
|
23937
24150
|
] }),
|
|
23938
|
-
(provider.location || provider.type) && /* @__PURE__ */ jsx("div", { className: "
|
|
24151
|
+
(provider.location || provider.type) && /* @__PURE__ */ jsx("div", { className: "text-muted-foreground truncate text-sm", children: [provider.type, provider.location].filter(Boolean).join(" \u2022 ") })
|
|
23939
24152
|
] }),
|
|
23940
24153
|
selectedProvider?.id === provider.id && /* @__PURE__ */ jsx(
|
|
23941
24154
|
"svg",
|
|
23942
24155
|
{
|
|
23943
|
-
className: "h-5 w-5 flex-shrink-0
|
|
24156
|
+
className: "text-primary h-5 w-5 flex-shrink-0",
|
|
23944
24157
|
fill: "none",
|
|
23945
24158
|
viewBox: "0 0 24 24",
|
|
23946
24159
|
stroke: "currentColor",
|
|
@@ -24838,19 +25051,19 @@ function QuickLinksCard({
|
|
|
24838
25051
|
link.icon && /* @__PURE__ */ jsx(
|
|
24839
25052
|
"span",
|
|
24840
25053
|
{
|
|
24841
|
-
className: `text-
|
|
25054
|
+
className: `text-muted-foreground ${layout === "grid" ? "mb-1" : "mr-3"} `,
|
|
24842
25055
|
children: link.icon
|
|
24843
25056
|
}
|
|
24844
25057
|
),
|
|
24845
25058
|
/* @__PURE__ */ jsxs("span", { className: "flex-1 text-left", children: [
|
|
24846
|
-
/* @__PURE__ */ jsx("span", { className: "block text-sm font-medium
|
|
24847
|
-
link.description && layout !== "grid" && /* @__PURE__ */ jsx("span", { className: "
|
|
25059
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground block text-sm font-medium", children: link.label }),
|
|
25060
|
+
link.description && layout !== "grid" && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground block text-xs", children: link.description })
|
|
24848
25061
|
] }),
|
|
24849
|
-
link.badge !== void 0 && /* @__PURE__ */ jsx("span", { className: "ml-2 rounded-full
|
|
25062
|
+
link.badge !== void 0 && /* @__PURE__ */ jsx("span", { className: "bg-primary/10 ml-2 rounded-full px-2 py-0.5 text-xs font-medium text-[var(--mieweb-primary-700)] dark:text-[var(--mieweb-primary-400)]", children: link.badge }),
|
|
24850
25063
|
!link.badge && layout !== "grid" && /* @__PURE__ */ jsx(
|
|
24851
25064
|
"svg",
|
|
24852
25065
|
{
|
|
24853
|
-
className: "h-4 w-4
|
|
25066
|
+
className: "text-muted-foreground h-4 w-4",
|
|
24854
25067
|
fill: "none",
|
|
24855
25068
|
stroke: "currentColor",
|
|
24856
25069
|
viewBox: "0 0 24 24",
|