@optifye/dashboard-core 6.11.1 → 6.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -32
- package/dist/index.mjs +5 -33
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -4630,7 +4630,7 @@ declare class UserManagementService {
|
|
|
4630
4630
|
* @param roleFilter - Optional filter by role
|
|
4631
4631
|
* @returns Promise<CompanyUserWithDetails[]>
|
|
4632
4632
|
*/
|
|
4633
|
-
getCompanyUsers(companyId: string, roleFilter?:
|
|
4633
|
+
getCompanyUsers(companyId: string, roleFilter?: string): Promise<CompanyUserWithDetails[]>;
|
|
4634
4634
|
/**
|
|
4635
4635
|
* Get ALL users across all companies (optifye role only)
|
|
4636
4636
|
* This method bypasses company filtering and returns all users in the system
|
package/dist/index.d.ts
CHANGED
|
@@ -4630,7 +4630,7 @@ declare class UserManagementService {
|
|
|
4630
4630
|
* @param roleFilter - Optional filter by role
|
|
4631
4631
|
* @returns Promise<CompanyUserWithDetails[]>
|
|
4632
4632
|
*/
|
|
4633
|
-
getCompanyUsers(companyId: string, roleFilter?:
|
|
4633
|
+
getCompanyUsers(companyId: string, roleFilter?: string): Promise<CompanyUserWithDetails[]>;
|
|
4634
4634
|
/**
|
|
4635
4635
|
* Get ALL users across all companies (optifye role only)
|
|
4636
4636
|
* This method bypasses company filtering and returns all users in the system
|
package/dist/index.js
CHANGED
|
@@ -69746,20 +69746,9 @@ var ImprovementCenterView = () => {
|
|
|
69746
69746
|
if (!supabase || !companyId) return;
|
|
69747
69747
|
try {
|
|
69748
69748
|
const userService2 = createUserManagementService(supabase);
|
|
69749
|
-
const
|
|
69750
|
-
|
|
69751
|
-
|
|
69752
|
-
);
|
|
69753
|
-
roleResults.forEach((result, index) => {
|
|
69754
|
-
if (result.status === "rejected") {
|
|
69755
|
-
console.warn(
|
|
69756
|
-
`[ImprovementCenterView] Failed to load ${roleFilters[index]} users`,
|
|
69757
|
-
result.reason
|
|
69758
|
-
);
|
|
69759
|
-
}
|
|
69760
|
-
});
|
|
69761
|
-
const users = roleResults.flatMap(
|
|
69762
|
-
(result) => result.status === "fulfilled" ? result.value : []
|
|
69749
|
+
const users = await userService2.getCompanyUsers(
|
|
69750
|
+
companyId,
|
|
69751
|
+
"supervisor,owner,industrial_engineer"
|
|
69763
69752
|
);
|
|
69764
69753
|
if (cancelled) return;
|
|
69765
69754
|
const membersById = /* @__PURE__ */ new Map();
|
|
@@ -72965,24 +72954,7 @@ var PlantHeadView = () => {
|
|
|
72965
72954
|
}
|
|
72966
72955
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[10px] font-bold text-slate-500", children: line.supervisor.split(" ").map((part) => part[0]).join("").slice(0, 2) }) }),
|
|
72967
72956
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
72968
|
-
/* @__PURE__ */ jsxRuntime.
|
|
72969
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-bold text-slate-800 text-[13px] truncate group-hover:text-indigo-600 transition-colors", children: line.name }),
|
|
72970
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
72971
|
-
"button",
|
|
72972
|
-
{
|
|
72973
|
-
type: "button",
|
|
72974
|
-
onClick: (event) => {
|
|
72975
|
-
event.stopPropagation();
|
|
72976
|
-
console.log(`Notify ${line.supervisor}`);
|
|
72977
|
-
},
|
|
72978
|
-
className: "flex items-center gap-1 text-[9px] font-bold text-slate-500 bg-slate-100 px-1.5 py-0.5 rounded transition-colors hover:bg-slate-200 hover:text-slate-700",
|
|
72979
|
-
children: [
|
|
72980
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bell, { className: "w-2.5 h-2.5" }),
|
|
72981
|
-
"Notify"
|
|
72982
|
-
]
|
|
72983
|
-
}
|
|
72984
|
-
)
|
|
72985
|
-
] }),
|
|
72957
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-bold text-slate-800 text-[13px] truncate group-hover:text-indigo-600 transition-colors", children: line.name }) }),
|
|
72986
72958
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-slate-400 font-medium", children: line.supervisor }) })
|
|
72987
72959
|
] })
|
|
72988
72960
|
] }),
|
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { createClient, REALTIME_SUBSCRIBE_STATES } from '@supabase/supabase-js';
|
|
|
10
10
|
import Hls, { Events, ErrorTypes } from 'hls.js';
|
|
11
11
|
import useSWR from 'swr';
|
|
12
12
|
import { memo, noop, warning, invariant, progress, secondsToMilliseconds, millisecondsToSeconds } from 'motion-utils';
|
|
13
|
-
import { Camera, AlertTriangle, ChevronDown, ChevronUp, Check, Map as Map$1, Video, ShieldCheck, Star, Award, Filter, X, Coffee, Plus, ArrowLeft, Clock, Calendar, Save, AlertCircle, Loader2, Minus, ArrowDown, ArrowUp, ChevronLeft, ChevronRight, TrendingUp, Sparkles, Pause, Play, Wrench, XCircle, Package, UserX, Zap, HelpCircle, Tag, Palette, CheckCircle2, RefreshCw, TrendingDown, FolderOpen, Folder, Sliders, Activity, Layers, Search, Edit2, ArrowRight, CheckCircle, User, Users, Shield, Building2, Mail, Lock, Info, Share2, Trophy, Target, Download, Sun, Moon, MousePointer, UserPlus, UserCog, Trash2, Eye, MoreVertical, BarChart3, Pencil, UserCheck, LogOut, Film, MessageSquare, Menu, Send, Copy,
|
|
13
|
+
import { Camera, AlertTriangle, ChevronDown, ChevronUp, Check, Map as Map$1, Video, ShieldCheck, Star, Award, Filter, X, Coffee, Plus, ArrowLeft, Clock, Calendar, Save, AlertCircle, Loader2, Minus, ArrowDown, ArrowUp, ChevronLeft, ChevronRight, TrendingUp, Sparkles, Pause, Play, Wrench, XCircle, Package, UserX, Zap, HelpCircle, Tag, Palette, CheckCircle2, RefreshCw, TrendingDown, FolderOpen, Folder, Sliders, Activity, Layers, Search, Edit2, ArrowRight, CheckCircle, User, Users, Shield, Building2, Mail, Lock, Info, Share2, Trophy, Target, Download, Sun, Moon, MousePointer, UserPlus, UserCog, Trash2, Eye, MoreVertical, BarChart3, Pencil, UserCheck, LogOut, Film, MessageSquare, Menu, Send, Copy, ArrowUpRight, Settings, LifeBuoy, EyeOff, Flame, Crown, Medal } from 'lucide-react';
|
|
14
14
|
import { toast } from 'sonner';
|
|
15
15
|
import { BarChart as BarChart$1, CartesianGrid, XAxis, YAxis, ReferenceLine, Tooltip, Legend, Bar, LabelList, ResponsiveContainer, LineChart as LineChart$1, Line, PieChart, Pie, Cell, ComposedChart, Area, ScatterChart, Scatter } from 'recharts';
|
|
16
16
|
import { Slot } from '@radix-ui/react-slot';
|
|
@@ -69717,20 +69717,9 @@ var ImprovementCenterView = () => {
|
|
|
69717
69717
|
if (!supabase || !companyId) return;
|
|
69718
69718
|
try {
|
|
69719
69719
|
const userService2 = createUserManagementService(supabase);
|
|
69720
|
-
const
|
|
69721
|
-
|
|
69722
|
-
|
|
69723
|
-
);
|
|
69724
|
-
roleResults.forEach((result, index) => {
|
|
69725
|
-
if (result.status === "rejected") {
|
|
69726
|
-
console.warn(
|
|
69727
|
-
`[ImprovementCenterView] Failed to load ${roleFilters[index]} users`,
|
|
69728
|
-
result.reason
|
|
69729
|
-
);
|
|
69730
|
-
}
|
|
69731
|
-
});
|
|
69732
|
-
const users = roleResults.flatMap(
|
|
69733
|
-
(result) => result.status === "fulfilled" ? result.value : []
|
|
69720
|
+
const users = await userService2.getCompanyUsers(
|
|
69721
|
+
companyId,
|
|
69722
|
+
"supervisor,owner,industrial_engineer"
|
|
69734
69723
|
);
|
|
69735
69724
|
if (cancelled) return;
|
|
69736
69725
|
const membersById = /* @__PURE__ */ new Map();
|
|
@@ -72936,24 +72925,7 @@ var PlantHeadView = () => {
|
|
|
72936
72925
|
}
|
|
72937
72926
|
) : /* @__PURE__ */ jsx("div", { className: "w-full h-full flex items-center justify-center text-[10px] font-bold text-slate-500", children: line.supervisor.split(" ").map((part) => part[0]).join("").slice(0, 2) }) }),
|
|
72938
72927
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
72939
|
-
/* @__PURE__ */
|
|
72940
|
-
/* @__PURE__ */ jsx("div", { className: "font-bold text-slate-800 text-[13px] truncate group-hover:text-indigo-600 transition-colors", children: line.name }),
|
|
72941
|
-
/* @__PURE__ */ jsxs(
|
|
72942
|
-
"button",
|
|
72943
|
-
{
|
|
72944
|
-
type: "button",
|
|
72945
|
-
onClick: (event) => {
|
|
72946
|
-
event.stopPropagation();
|
|
72947
|
-
console.log(`Notify ${line.supervisor}`);
|
|
72948
|
-
},
|
|
72949
|
-
className: "flex items-center gap-1 text-[9px] font-bold text-slate-500 bg-slate-100 px-1.5 py-0.5 rounded transition-colors hover:bg-slate-200 hover:text-slate-700",
|
|
72950
|
-
children: [
|
|
72951
|
-
/* @__PURE__ */ jsx(Bell, { className: "w-2.5 h-2.5" }),
|
|
72952
|
-
"Notify"
|
|
72953
|
-
]
|
|
72954
|
-
}
|
|
72955
|
-
)
|
|
72956
|
-
] }),
|
|
72928
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx("div", { className: "font-bold text-slate-800 text-[13px] truncate group-hover:text-indigo-600 transition-colors", children: line.name }) }),
|
|
72957
72929
|
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: /* @__PURE__ */ jsx("span", { className: "text-[10px] text-slate-400 font-medium", children: line.supervisor }) })
|
|
72958
72930
|
] })
|
|
72959
72931
|
] }),
|