fix : import issues
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
6dd15521ad
commit
b7be0a6daa
|
|
@ -1,4 +1,3 @@
|
||||||
import React from "react";
|
|
||||||
import { Link, useLocation } from "wouter";
|
import { Link, useLocation } from "wouter";
|
||||||
import { useAuth } from "@/contexts/AuthContext";
|
import { useAuth } from "@/contexts/AuthContext";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import React from "react";
|
|
||||||
import { Skeleton } from "@/components/ui/skeleton";
|
import { Skeleton } from "@/components/ui/skeleton";
|
||||||
import { Card, CardContent, CardHeader } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader } from "@/components/ui/card";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import React from "react";
|
|
||||||
import { Badge } from "@/components/ui/badge";
|
import { Badge } from "@/components/ui/badge";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import React from "react";
|
|
||||||
import { Badge } from "@/components/ui/badge";
|
import { Badge } from "@/components/ui/badge";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -111,8 +111,8 @@ const ChartTooltipContent = React.forwardRef<
|
||||||
labelKey?: string
|
labelKey?: string
|
||||||
}
|
}
|
||||||
>(
|
>(
|
||||||
(
|
(props: any, ref) => {
|
||||||
{
|
const {
|
||||||
active,
|
active,
|
||||||
payload,
|
payload,
|
||||||
className,
|
className,
|
||||||
|
|
@ -126,9 +126,8 @@ const ChartTooltipContent = React.forwardRef<
|
||||||
color,
|
color,
|
||||||
nameKey,
|
nameKey,
|
||||||
labelKey,
|
labelKey,
|
||||||
},
|
} = props
|
||||||
ref
|
|
||||||
) => {
|
|
||||||
const { config } = useChart()
|
const { config } = useChart()
|
||||||
|
|
||||||
const tooltipLabel = React.useMemo(() => {
|
const tooltipLabel = React.useMemo(() => {
|
||||||
|
|
@ -184,8 +183,8 @@ const ChartTooltipContent = React.forwardRef<
|
||||||
{!nestLabel ? tooltipLabel : null}
|
{!nestLabel ? tooltipLabel : null}
|
||||||
<div className="grid gap-1.5">
|
<div className="grid gap-1.5">
|
||||||
{payload
|
{payload
|
||||||
.filter((item) => item.type !== "none")
|
.filter((item: any) => item.type !== "none")
|
||||||
.map((item, index) => {
|
.map((item: any, index: number) => {
|
||||||
const key = `${nameKey || item.name || item.dataKey || "value"}`
|
const key = `${nameKey || item.name || item.dataKey || "value"}`
|
||||||
const itemConfig = getPayloadConfigFromPayload(config, item, key)
|
const itemConfig = getPayloadConfigFromPayload(config, item, key)
|
||||||
const indicatorColor = color || item.payload.fill || item.color
|
const indicatorColor = color || item.payload.fill || item.color
|
||||||
|
|
@ -260,11 +259,7 @@ const ChartLegend = RechartsPrimitive.Legend
|
||||||
|
|
||||||
const ChartLegendContent = React.forwardRef<
|
const ChartLegendContent = React.forwardRef<
|
||||||
HTMLDivElement,
|
HTMLDivElement,
|
||||||
React.ComponentProps<"div"> &
|
any
|
||||||
Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
|
|
||||||
hideIcon?: boolean
|
|
||||||
nameKey?: string
|
|
||||||
}
|
|
||||||
>(
|
>(
|
||||||
(
|
(
|
||||||
{ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey },
|
{ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey },
|
||||||
|
|
@ -286,8 +281,8 @@ const ChartLegendContent = React.forwardRef<
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{payload
|
{payload
|
||||||
.filter((item) => item.type !== "none")
|
.filter((item: any) => item.type !== "none")
|
||||||
.map((item) => {
|
.map((item: any) => {
|
||||||
const key = `${nameKey || item.dataKey || "value"}`
|
const key = `${nameKey || item.dataKey || "value"}`
|
||||||
const itemConfig = getPayloadConfigFromPayload(config, item, key)
|
const itemConfig = getPayloadConfigFromPayload(config, item, key)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { GripVertical } from "lucide-react"
|
import { GripVertical } from "lucide-react"
|
||||||
import * as ResizablePrimitive from "react-resizable-panels"
|
import { Panel, Group as PanelGroup, Separator as PanelResizeHandle } from "react-resizable-panels"
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils"
|
||||||
|
|
||||||
const ResizablePanelGroup = ({
|
const ResizablePanelGroup = ({
|
||||||
className,
|
className,
|
||||||
...props
|
...props
|
||||||
}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (
|
}: React.ComponentProps<typeof PanelGroup>) => (
|
||||||
<ResizablePrimitive.PanelGroup
|
<PanelGroup
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
||||||
className
|
className
|
||||||
|
|
@ -18,16 +18,16 @@ const ResizablePanelGroup = ({
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
||||||
const ResizablePanel = ResizablePrimitive.Panel
|
const ResizablePanel = Panel
|
||||||
|
|
||||||
const ResizableHandle = ({
|
const ResizableHandle = ({
|
||||||
withHandle,
|
withHandle,
|
||||||
className,
|
className,
|
||||||
...props
|
...props
|
||||||
}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
}: React.ComponentProps<typeof PanelResizeHandle> & {
|
||||||
withHandle?: boolean
|
withHandle?: boolean
|
||||||
}) => (
|
}) => (
|
||||||
<ResizablePrimitive.PanelResizeHandle
|
<PanelResizeHandle
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
||||||
className
|
className
|
||||||
|
|
@ -39,7 +39,7 @@ const ResizableHandle = ({
|
||||||
<GripVertical className="h-2.5 w-2.5" />
|
<GripVertical className="h-2.5 w-2.5" />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</ResizablePrimitive.PanelResizeHandle>
|
</PanelResizeHandle>
|
||||||
)
|
)
|
||||||
|
|
||||||
export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { createContext, useContext, ReactNode } from "react";
|
import { createContext, useContext, ReactNode } from "react";
|
||||||
import { useAuth } from "./AuthContext";
|
import { useAuth } from "./AuthContext";
|
||||||
|
|
||||||
interface TenantContextType {
|
interface TenantContextType {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ export type TaskPriority = "high" | "medium" | "low";
|
||||||
export interface MockUser {
|
export interface MockUser {
|
||||||
id: number;
|
id: number;
|
||||||
tenantId: number;
|
tenantId: number;
|
||||||
|
tenantName: string;
|
||||||
name: string;
|
name: string;
|
||||||
email: string;
|
email: string;
|
||||||
role: UserRole;
|
role: UserRole;
|
||||||
|
|
@ -110,6 +111,7 @@ export interface MockActivityLog {
|
||||||
export const CURRENT_USER: MockUser = {
|
export const CURRENT_USER: MockUser = {
|
||||||
id: 1,
|
id: 1,
|
||||||
tenantId: 1,
|
tenantId: 1,
|
||||||
|
tenantName: "Acme Corporation",
|
||||||
name: "Alex Johnson",
|
name: "Alex Johnson",
|
||||||
email: "admin@acme.corp",
|
email: "admin@acme.corp",
|
||||||
role: "tenant_admin",
|
role: "tenant_admin",
|
||||||
|
|
@ -134,6 +136,7 @@ export const MOCK_USERS: MockUser[] = [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
tenantId: 1,
|
tenantId: 1,
|
||||||
|
tenantName: "Acme Corporation",
|
||||||
name: "Alex Johnson",
|
name: "Alex Johnson",
|
||||||
email: "admin@acme.corp",
|
email: "admin@acme.corp",
|
||||||
role: "tenant_admin",
|
role: "tenant_admin",
|
||||||
|
|
@ -146,6 +149,7 @@ export const MOCK_USERS: MockUser[] = [
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
tenantId: 1,
|
tenantId: 1,
|
||||||
|
tenantName: "Acme Corporation",
|
||||||
name: "Sarah Chen",
|
name: "Sarah Chen",
|
||||||
email: "sarah@acme.corp",
|
email: "sarah@acme.corp",
|
||||||
role: "manager",
|
role: "manager",
|
||||||
|
|
@ -158,6 +162,7 @@ export const MOCK_USERS: MockUser[] = [
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
tenantId: 1,
|
tenantId: 1,
|
||||||
|
tenantName: "Acme Corporation",
|
||||||
name: "Marcus Williams",
|
name: "Marcus Williams",
|
||||||
email: "marcus@acme.corp",
|
email: "marcus@acme.corp",
|
||||||
role: "employee",
|
role: "employee",
|
||||||
|
|
@ -170,6 +175,7 @@ export const MOCK_USERS: MockUser[] = [
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
tenantId: 1,
|
tenantId: 1,
|
||||||
|
tenantName: "Acme Corporation",
|
||||||
name: "Priya Patel",
|
name: "Priya Patel",
|
||||||
email: "priya@acme.corp",
|
email: "priya@acme.corp",
|
||||||
role: "employee",
|
role: "employee",
|
||||||
|
|
@ -182,6 +188,7 @@ export const MOCK_USERS: MockUser[] = [
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
tenantId: 1,
|
tenantId: 1,
|
||||||
|
tenantName: "Acme Corporation",
|
||||||
name: "David Kim",
|
name: "David Kim",
|
||||||
email: "david@acme.corp",
|
email: "david@acme.corp",
|
||||||
role: "employee",
|
role: "employee",
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ export default function UsersPage() {
|
||||||
const user: MockUser = {
|
const user: MockUser = {
|
||||||
id: users.length + 100,
|
id: users.length + 100,
|
||||||
tenantId: 1,
|
tenantId: 1,
|
||||||
|
tenantName: "Acme Corporation",
|
||||||
name: newUser.name,
|
name: newUser.name,
|
||||||
email: newUser.email,
|
email: newUser.email,
|
||||||
role: newUser.role,
|
role: newUser.role,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue