Moving files and rename some of them.

This commit is contained in:
charles-gauthereau
2024-12-16 16:30:00 +01:00
parent c97d68d697
commit 31ee81c10f
75 changed files with 64 additions and 175 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
import {useEffect, useRef} from "react";
import {useSearchParams} from "next/navigation";
import {LoginForm} from "@/components/wrappers/auth/Login/LoginForm/LoginForm";
import {LoginForm} from "@/components/wrappers/auth/login/loginForm/LoginForm";
import {toast} from "sonner";
export default function SignInPage(props: {
@@ -9,8 +9,8 @@ import {formatDateLastContact} from "@/utils/date-formatting";
import {Button, buttonVariants} from "@/components/ui/button";
import {Card, CardContent, CardHeader} from "@/components/ui/card";
import {AgentModalKey} from "@/components/wrappers/dashboard/agent/AgentModalKey/AgentModalKey";
import {CardsWithPagination} from "@/components/wrappers/cards-with-pagination";
import {DatabaseCard} from "@/components/wrappers/dashboard/Projects/ProjectCard/ProjectDatabaseCard";
import {CardsWithPagination} from "@/components/wrappers/common/cards-with-pagination";
import {DatabaseCard} from "@/components/wrappers/dashboard/projects/ProjectCard/ProjectDatabaseCard";
export default async function RoutePage(props: PageParams<{ agentId: string }>) {
+1 -1
View File
@@ -1,7 +1,7 @@
import {PageParams} from "@/types/next";
import {prisma} from "@/prisma";
import {AgentCard} from "@/components/wrappers/dashboard/agent/AgentCard/AgentCard";
import {CardsWithPagination} from "@/components/wrappers/cards-with-pagination";
import {CardsWithPagination} from "@/components/wrappers/common/cards-with-pagination";
import {Button} from "@/components/ui/button";
import Link from 'next/link'
import {Page, PageActions, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
+1 -1
View File
@@ -2,7 +2,7 @@ import React from "react";
import {redirect} from "next/navigation";
import {SidebarInset, SidebarProvider} from "@/components/ui/sidebar"
import {AppSidebar} from "@/components/wrappers/dashboard/SideBar/app-sidebar";
import {AppSidebar} from "@/components/wrappers/dashboard/sideBar/app-sidebar";
import {currentUser} from "@/auth/current-user";
import {Header} from "@/features/layout/Header";
import {prisma} from "@/prisma";
+1 -1
View File
@@ -1,4 +1,4 @@
import {LoadingSpinner} from "@/components/wrappers/Loading/LoadingSpinner";
import {LoadingSpinner} from "@/components/wrappers/common/loading/LoadingSpinner";
export default function Loading() {
return (
+3 -4
View File
@@ -1,13 +1,12 @@
import {PageParams} from "@/types/next";
import {Page, PageActions, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
import {Avatar, AvatarFallback, AvatarImage} from "@/components/ui/avatar";
import {notFound} from "next/navigation";
import {requiredCurrentUser} from "@/auth/current-user";
import {UserForm} from "@/components/wrappers/dashboard/Profile/UserForm/UserForm";
import {UserForm} from "@/components/wrappers/dashboard/profile/UserForm/UserForm";
import {prisma} from "@/prisma";
import {Badge} from "@/components/ui/badge";
import {ButtonDeleteAccount} from "@/components/wrappers/dashboard/Profile/ButtonDeleteAccount/ButtonDeleteAccount";
import {AvatarWithUpload} from "@/components/wrappers/dashboard/Profile/Avatar/AvatarWithUpload";
import {ButtonDeleteAccount} from "@/components/wrappers/dashboard/profile/ButtonDeleteAccount/ButtonDeleteAccount";
import {AvatarWithUpload} from "@/components/wrappers/dashboard/profile/Avatar/AvatarWithUpload";
export default async function RoutePage(props: PageParams<{}>) {
@@ -1,6 +1,5 @@
import {PageParams} from "@/types/next";
import {Page, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
import {AgentForm} from "@/components/wrappers/dashboard/agent/AgentForm/AgentForm";
import {requiredCurrentUser} from "@/auth/current-user";
import {prisma} from "@/prisma";
import {notFound} from "next/navigation";
@@ -3,8 +3,8 @@ import {prisma} from "@/prisma";
import {notFound} from "next/navigation";
import {Page, PageActions, PageContent, PageDescription, PageTitle} from "@/features/layout/page";
import {BackupButton} from "@/components/wrappers/dashboard/backup/backup-button/backup-button";
import {DatabaseTabs} from "@/components/wrappers/dashboard/Projects/Database/DatabaseTabs";
import {DatabaseKpi} from "@/components/wrappers/dashboard/Projects/Database/DatabaseKpi";
import {DatabaseTabs} from "@/components/wrappers/dashboard/projects/Database/DatabaseTabs";
import {DatabaseKpi} from "@/components/wrappers/dashboard/projects/Database/DatabaseKpi";
import {EditButton} from "@/components/wrappers/dashboard/database/EditButton/EditButton";
import {CronButton} from "@/components/wrappers/dashboard/database/CronButton/CronButton";
@@ -3,7 +3,7 @@ import {notFound} from "next/navigation";
import {PageParams} from "@/types/next";
import {Page, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
import {prisma} from "@/prisma";
import {ProjectForm} from "@/components/wrappers/dashboard/Projects/ProjectsForm/ProjectForm";
import {ProjectForm} from "@/components/wrappers/dashboard/projects/ProjectsForm/ProjectForm";
export default async function RoutePage(props: PageParams<{
@@ -4,9 +4,9 @@ import {buttonVariants} from "@/components/ui/button";
import {prisma} from "@/prisma";
import {GearIcon} from "@radix-ui/react-icons";
import Link from "next/link";
import {ButtonDeleteProject} from "@/components/wrappers/dashboard/Projects/ButtonDeleteProject/ButtonDeleteProject";
import {CardsWithPagination} from "@/components/wrappers/cards-with-pagination";
import {ProjectDatabaseCard} from "@/components/wrappers/dashboard/Projects/ProjectCard/ProjectDatabaseCard";
import {ButtonDeleteProject} from "@/components/wrappers/dashboard/projects/ButtonDeleteProject/ButtonDeleteProject";
import {CardsWithPagination} from "@/components/wrappers/common/cards-with-pagination";
import {ProjectDatabaseCard} from "@/components/wrappers/dashboard/projects/ProjectCard/ProjectDatabaseCard";
import {notFound} from "next/navigation";
@@ -1,7 +1,7 @@
import {PageParams} from "@/types/next";
import {Page, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
import {prisma} from "@/prisma";
import {ProjectForm} from "@/components/wrappers/dashboard/Projects/ProjectsForm/ProjectForm";
import {ProjectForm} from "@/components/wrappers/dashboard/projects/ProjectsForm/ProjectForm";
export default async function RoutePage(props: PageParams<{}>) {
+2 -2
View File
@@ -1,10 +1,10 @@
import {PageParams} from "@/types/next";
import {prisma} from "@/prisma";
import {CardsWithPagination} from "@/components/wrappers/cards-with-pagination";
import {CardsWithPagination} from "@/components/wrappers/common/cards-with-pagination";
import {Button} from "@/components/ui/button";
import Link from 'next/link'
import {Page, PageActions, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
import {ProjectCard} from "@/components/wrappers/dashboard/Projects/ProjectCard/ProjectCard";
import {ProjectCard} from "@/components/wrappers/dashboard/projects/ProjectCard/ProjectCard";
import {requiredCurrentUser} from "@/auth/current-user";
export default async function RoutePage(props: PageParams<{}>) {
+1 -1
View File
@@ -2,7 +2,7 @@ import {prisma} from "@/prisma";
import {PageParams} from "@/types/next";
import {Page, PageContent, PageDescription, PageHeader, PageTitle} from "@/features/layout/page";
import {requiredCurrentUser} from "@/auth/current-user";
import {SettingsTabs} from "@/components/wrappers/dashboard/Settings/SettingsTabs/SettingsTabs";
import {SettingsTabs} from "@/components/wrappers/dashboard/settings/SettingsTabs/SettingsTabs";
export default async function RoutePage(props: PageParams<{}>) {
-1
View File
@@ -1,5 +1,4 @@
import {NextResponse} from "next/server";
import {Body} from "../status/route";
import {prisma} from "@/prisma";
import {isUuidv4} from "@/utils/verify-uuid";
import {uploadLocalPrivate} from "@/features/upload/private/upload.action";
@@ -6,12 +6,6 @@ import {isUuidv4} from "@/utils/verify-uuid";
import {getFileUrlPresignedLocal} from "@/features/upload/private/upload.action";
export async function handleDatabases(body: Body, agent: Agent, lastContact: Date) {
const databasesResponse = [];
-97
View File
@@ -1,100 +1,3 @@
// import { EventEmitter } from 'events';
//
// const eventEmitter = new EventEmitter();
//
//
// export async function GET(request: Request) {
// return new Response(new ReadableStream({
// async pull(controller) {
// eventEmitter.on('modification', (data) => {
// controller.enqueue(`event: modification\n`);
// controller.enqueue(`data: ${JSON.stringify(data)}\n\n`);
// controller.close();
// });
// },
// }), {
// status: 200,
// headers: {
// 'Content-Type': 'text/event-stream',
// 'Cache-Control': 'no-cache',
// Connection: 'keep-alive',
// },
// });
// }
//
// export async function POST(request: Request) {
// const data = await request.json();
// eventEmitter.emit('modification', data);
// return new Response('Event sent', { status: 200 });
// }
//
// const eventEmitter = new EventEmitter();
//
// export async function GET(request: Request) {
// return new Response(new ReadableStream({
// async pull(controller) {
// eventEmitter.on('modification', (data) => {
// console.log('Modification event triggered:', data);
// controller.enqueue(`event: modification\n`);
// controller.enqueue(`data: ${JSON.stringify(data)}\n\n`);
// });
//
// // Close the controller when the client closes the connection
// request.signal.addEventListener('abort', () => {
// controller.close();
// });
// },
// }), {
// status: 200,
// headers: {
// 'Content-Type': 'text/event-stream',
// 'Cache-Control': 'no-cache',
// Connection: 'keep-alive',
// },
// });
// }
//
// export async function POST(request: Request) {
// const data = await request.json();
// console.log(data);
// eventEmitter.emit('modification', data);
// return new Response('Event sent', { status: 200 });
// }
// const eventEmitter = new EventEmitter();
//
// export async function GET(request: Request) {
// console.log('GET request received');
// return new Response(new ReadableStream({
// async pull(controller) {
// console.log('Controller created:', controller);
// eventEmitter.on('modification', (data) => {
// console.log('Modification event triggered:', data);
// controller.enqueue(`event: modification\n`);
// controller.enqueue(`data: ${JSON.stringify(data)}\n\n`);
// });
// // Close the controller when the client closes the connection
// request.signal.addEventListener('abort', () => {
// controller.close();
// });
// },
// }), {
// status: 200,
// headers: {
// 'Content-Type': 'text/event-stream',
// 'Cache-Control': 'no-cache',
// Connection: 'keep-alive',
// },
// });
// }
//
// export async function POST(request: Request) {
// console.log('POST request received');
// const data = await request.json();
// console.log('Data received:', data);
// eventEmitter.emit('modification', data);
// return new Response('Event sent', { status: 200 });
// }
import { EventEmitter } from 'events';
export const eventEmitter = new EventEmitter();
@@ -12,10 +12,9 @@ import {useMutation} from "@tanstack/react-query";
import {TooltipProvider} from "@/components/ui/tooltip";
import Link from "next/link";
import {PasswordInput} from "@/components/wrappers/auth/PaswordInput/password-input";
import {LoginSchema, LoginType} from "@/components/wrappers/auth/Login/LoginForm/login-form.schema";
import {signInAction} from "@/features/auth/auth.action";
import {SocialAuthButton} from "@/components/wrappers/auth/Login/SocialAuth/SocialAuthButtons/SocialAuthButton";
import Image from 'next/image';
import {LoginSchema, LoginType} from "@/components/wrappers/auth/login/loginForm/login-form.schema";
import {SocialAuthButton} from "@/components/wrappers/auth/login/socialAuth/socialAuthButtons/SocialAuthButton";
export type loginFormProps = {
defaultValues?: LoginType;
@@ -3,7 +3,7 @@
import React, {useState} from 'react'
import {cn} from "@/lib/utils";
import {PaginationNavigation} from "@/components/wrappers/pagination/pagination-navigation";
import {PaginationNavigation} from "@/components/wrappers/common/pagination/pagination-navigation";
export type cardsWithPaginationProps = {
className?: string
+2 -3
View File
@@ -2,7 +2,7 @@
import {useEffect, useState} from "react";
import {Check, ChevronDown, KeyRound} from "lucide-react"
import {Check, ChevronDown} from "lucide-react"
import {cn} from "@/lib/utils"
import {Button} from "@/components/ui/button"
@@ -22,8 +22,7 @@ import {
import {FormControl} from "@/components/ui/form";
import {SidebarMenuButton} from "@/components/ui/sidebar";
import {Separator} from "@/components/ui/separator";
import {AgentModalKey} from "@/components/wrappers/dashboard/agent/AgentModalKey/AgentModalKey";
import {CreateOrganizationModal} from "@/components/wrappers/dashboard/Organization/create-organisation-modal";
import {CreateOrganizationModal} from "@/components/wrappers/dashboard/organization/create-organisation-modal";
export type comboBoxProps = {
values: Array<{ value: string, label: string }>
@@ -5,7 +5,7 @@ import {
PaginationNext,
PaginationPrevious
} from "@/components/ui/pagination";
import {PaginationIndexes} from "@/components/wrappers/pagination/pagination-indexes";
import {PaginationIndexes} from "@/components/wrappers/common/pagination/pagination-indexes";
import {cn} from "@/lib/utils";
@@ -5,8 +5,8 @@ import {useState} from "react";
import {
ColumnDef, getCoreRowModel, getPaginationRowModel, getSortedRowModel, SortingState, useReactTable
} from "@tanstack/react-table"
import {DataTable as BaseDataTable} from "@/components/wrappers/table/data-table";
import {TablePagination} from "@/components/wrappers/table/table-pagination";
import {DataTable as BaseDataTable} from "@/components/wrappers/common/table/data-table";
import {TablePagination} from "@/components/wrappers/common/table/table-pagination";
interface DataTableProps<TData, TValue> {
columns: ColumnDef<TData, TValue>[]
@@ -1,4 +1,4 @@
import {PaginationNavigation} from "@/components/wrappers/pagination/pagination-navigation";
import {PaginationNavigation} from "@/components/wrappers/common/pagination/pagination-navigation";
export type paginationNavigationProps = {
@@ -1,7 +1,7 @@
"use client"
import {TablePaginationNavigation} from "@/components/wrappers/table/table-pagination-navigation";
import {TablePaginationSize} from "@/components/wrappers/table/table-pagination-size";
import {TablePaginationNavigation} from "@/components/wrappers/common/table/table-pagination-navigation";
import {TablePaginationSize} from "@/components/wrappers/common/table/table-pagination-size";
import {cn} from "@/lib/utils";
interface tablePaginationProps {
@@ -7,7 +7,6 @@ import {sendEmail} from "@/utils/email-helper";
import TestEmailSettings from "../../../../../../emails/TestEmailSettings";
import {render} from "@react-email/render";
import {toast} from "sonner";
import HelloEmail from "../../../../../../emails/HelloEmail";
@@ -9,7 +9,6 @@ import {ButtonWithLoading} from "@/components/wrappers/common/button/ButtonWithL
import {useMutation} from "@tanstack/react-query";
import {checkConnexionToS3} from "@/features/upload/public/upload.action";
import {toast} from "sonner";
import {updateUserAction} from "@/components/wrappers/dashboard/Profile/UserForm/user-form.action";
import {useRouter} from "next/navigation";
import {
updateStorageSettingsAction
@@ -1,8 +1,8 @@
import {flexRender, Row, RowData} from "@tanstack/react-table";
import {User} from "@prisma/client";
import {DataTableWithPagination} from "@/components/wrappers/table/data-table-with-pagination";
import {usersColumns} from "@/components/wrappers/dashboard/Settings/SettingsUsersTab/columns-users";
import {DataTableWithPagination} from "@/components/wrappers/common/table/data-table-with-pagination";
import {usersColumns} from "@/components/wrappers/dashboard/settings/SettingsUsersTab/columns-users";
import {Table, TableBody, TableCell, TableHead, TableHeader, TableRow} from "@/components/ui/table";
import {cn} from "@/lib/utils";
@@ -4,7 +4,7 @@ import {Card, CardContent, CardHeader} from "@/components/ui/card";
import Link from "next/link";
import {ValueIcon} from "@radix-ui/react-icons";
import {Circle} from "lucide-react";
import {ConnectionCircle} from "@/components/wrappers/connection-circle";
import {ConnectionCircle} from "@/components/wrappers/common/connection-circle";
import {formatDateLastContact} from "@/utils/date-formatting";
export type agentCardProps = {
@@ -10,13 +10,13 @@ import {
DialogTrigger,
} from "@/components/ui/dialog"
import {CodeSnippet} from "@/components/wrappers/CodeSnippet/CodeSnippet";
import {generateEdgeKey} from "@/utils/edge_key";
import {Copy} from "lucide-react";
import {PropsWithChildren, useState} from "react";
import {CopyButton} from "@/components/wrappers/common/button/copy-button";
import {Agent} from "@prisma/client";
import {getServerUrl} from "@/utils/get-server-url";
import {CodeSnippet} from "@/components/wrappers/codeSnippet/CodeSnippet";
export type agentRegistrationDialogProps = PropsWithChildren<{
agent: Agent
@@ -2,7 +2,7 @@
import {useState} from "react";
import {DateTimePicker} from "@/components/wrappers/daytime-picker";
import {DateTimePicker} from "@/components/wrappers/common/daytime-picker";
import {Button} from "@/components/ui/button";
import {
Form,
@@ -1,8 +1,8 @@
import {Avatar, AvatarFallback, AvatarImage} from "@/components/ui/avatar"
import {currentUser} from "@/auth/current-user";
import {LoggedInDropdown} from "@/components/wrappers/dashboard/LoggedInDropdown/LoggedInDropdown";
import {SidebarMenuButton} from "@/components/ui/sidebar";
import {ChevronUp} from "lucide-react";
import {LoggedInDropdown} from "@/components/wrappers/dashboard/loggedInDropdown/LoggedInDropdown";
export const LoggedInButton = async () => {
@@ -6,7 +6,7 @@ import {Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogTr
import {Button} from "@/components/ui/button";
import {Form, FormControl, FormField, FormItem, FormLabel, FormMessage, useZodForm} from "@/components/ui/form";
import {Input} from "@/components/ui/input";
import {OrganizationSchema} from "@/components/wrappers/dashboard/Organization/organization.schema";
import {OrganizationSchema} from "@/components/wrappers/dashboard/organization/organization.schema";
export type createOrganizationModalProps = {
children: any
@@ -4,7 +4,6 @@ import {useEffect, useState} from "react";
import {ComboBox} from "@/components/wrappers/common/combobox";
import {Organization} from "@prisma/client";
import {useStore} from "@/state-management/store";
import {getCurrentOrganizationSlug, setCurrentOrganizationSlug} from "@/features/dashboard/organization-cookie";
import {useSidebar} from "@/components/ui/sidebar";
@@ -6,7 +6,7 @@ import {toast} from "sonner";
import {uploadImageAction} from "@/features/upload/public/upload.action";
import {useMutation} from "@tanstack/react-query";
import {prisma} from "@/prisma";
import {updateImageUserAction} from "@/components/wrappers/dashboard/Profile/Avatar/avatar.action";
import {updateImageUserAction} from "@/components/wrappers/dashboard/profile/Avatar/avatar.action";
import {useRouter} from "next/navigation";
import {useSession} from "next-auth/react";
@@ -2,7 +2,7 @@
import {useMutation} from "@tanstack/react-query";
import {signOutAction} from "@/features/auth/auth.action";
import {ButtonWithConfirm} from "@/components/wrappers/common/button/ButtonWithConfirm/ButtonWithConfirm";
import {deleteUserAction} from "@/components/wrappers/dashboard/Profile/ButtonDeleteAccount/delete-account.action";
import {deleteUserAction} from "@/components/wrappers/dashboard/profile/ButtonDeleteAccount/delete-account.action";
import {Trash2} from "lucide-react";
export type ButtonDeleteAccountProps = {
@@ -10,9 +10,9 @@ import {Button} from "@/components/ui/button";
import {useRouter} from "next/navigation";
import {useMutation} from "@tanstack/react-query";
import {TooltipProvider} from "@/components/ui/tooltip";
import {UserSchema, UserType} from "@/components/wrappers/dashboard/Profile/UserForm/user-form.schema";
import {UserSchema, UserType} from "@/components/wrappers/dashboard/profile/UserForm/user-form.schema";
import {toast} from "sonner";
import {updateUserAction} from "@/components/wrappers/dashboard/Profile/UserForm/user-form.action";
import {updateUserAction} from "@/components/wrappers/dashboard/profile/UserForm/user-form.action";
import { useSession } from "next-auth/react";
export type userFormProps = {
@@ -2,7 +2,7 @@
import {userAction} from "@/safe-actions";
import {z} from "zod";
import {prisma} from "@/prisma";
import {UserSchema} from "@/components/wrappers/dashboard/Profile/UserForm/user-form.schema";
import {UserSchema} from "@/components/wrappers/dashboard/profile/UserForm/user-form.schema";
export const updateUserAction = userAction
.schema(
@@ -1,7 +1,7 @@
"use client"
import {Tabs, TabsContent, TabsList, TabsTrigger} from "@/components/ui/tabs";
import {DataTableWithPagination} from "@/components/wrappers/table/data-table-with-pagination";
import {DataTableWithPagination} from "@/components/wrappers/common/table/data-table-with-pagination";
import {backupColumns} from "@/features/backup/columns";
import {restoreColumns} from "@/features/restore/columns";
import {Backup, Database, Restoration} from "@prisma/client";
@@ -4,7 +4,7 @@ import Link from "next/link";
import Image from "next/image"
import {Database} from "@prisma/client";
import {Card, CardContent, CardHeader} from "@/components/ui/card";
import {ConnectionCircle} from "@/components/wrappers/connection-circle";
import {ConnectionCircle} from "@/components/wrappers/common/connection-circle";
import {formatDateLastContact} from "@/utils/date-formatting";
export type projectDatabaseCardProps = {
@@ -14,14 +14,14 @@ import {Input} from "@/components/ui/input";
import {Form} from "@/components/ui/form"
import {Button} from "@/components/ui/button";
import {useMutation} from "@tanstack/react-query";
import {ProjectSchema, ProjectType} from "@/components/wrappers/dashboard/Projects/ProjectsForm/ProjectForm.schema";
import {ProjectSchema, ProjectType} from "@/components/wrappers/dashboard/projects/ProjectsForm/ProjectForm.schema";
import {
createProjectAction,
updateProjectAction
} from "@/components/wrappers/dashboard/Projects/ProjectsForm/project-form.action";
} from "@/components/wrappers/dashboard/projects/ProjectsForm/project-form.action";
import {useRouter} from "next/navigation";
import {Database, Organization, Projects} from "@prisma/client"
import {MultiSelect} from "@/components/wrappers/MultiSelect/MultiSelect";
import {MultiSelect} from "@/components/wrappers/common/multiSelect/MultiSelect";
import {toast} from "sonner";
@@ -2,7 +2,7 @@
import {userAction} from "@/safe-actions";
import {prisma} from "@/prisma";
import {ProjectSchema} from "@/components/wrappers/dashboard/Projects/ProjectsForm/ProjectForm.schema";
import {ProjectSchema} from "@/components/wrappers/dashboard/projects/ProjectsForm/ProjectForm.schema";
import {z} from "zod";
import {ServerActionResult} from "@/types/action-type";
import {Projects} from "@prisma/client";
@@ -1,13 +1,13 @@
"use client"
import {Tabs, TabsContent, TabsList, TabsTrigger} from "@/components/ui/tabs";
import {DataTableWithPagination} from "@/components/wrappers/table/data-table-with-pagination";
import {usersColumns} from "@/components/wrappers/dashboard/Settings/SettingsUsersTab/columns-users";
import {DataTableWithPagination} from "@/components/wrappers/common/table/data-table-with-pagination";
import {usersColumns} from "@/components/wrappers/dashboard/settings/SettingsUsersTab/columns-users";
import {User, Settings} from "@prisma/client";
import {backupColumns} from "@/features/backup/columns";
import {SettingsEmailTab} from "@/components/wrappers/dashboard/admin/AdminEmailTab/SettingsEmailTab";
import {SettingsStorageTab} from "@/components/wrappers/dashboard/admin/AdminStorageTab/SettingsStorageTab";
import {SettingsUsersTab} from "@/components/wrappers/dashboard/Settings/SettingsUsersTab/SettingsUsersTab";
import {SettingsUsersTab} from "@/components/wrappers/dashboard/settings/SettingsUsersTab/SettingsUsersTab";
export type SettingsTabsProps = {
@@ -1,6 +1,6 @@
import {User} from "@prisma/client";
import {DataTableWithPagination} from "@/components/wrappers/table/data-table-with-pagination";
import {usersColumns} from "@/components/wrappers/dashboard/Settings/SettingsUsersTab/columns-users";
import {DataTableWithPagination} from "@/components/wrappers/common/table/data-table-with-pagination";
import {usersColumns} from "@/components/wrappers/dashboard/settings/SettingsUsersTab/columns-users";
import {UsersDataTable} from "@/components/wrappers/dashboard/admin/admin-user-table";
@@ -3,13 +3,13 @@
import {ColumnDef} from "@tanstack/react-table"
import {Badge} from "@/components/ui/badge";
import {User} from "@prisma/client";
import {updateUserAction} from "@/components/wrappers/dashboard/Profile/UserForm/user-form.action";
import {updateUserAction} from "@/components/wrappers/dashboard/profile/UserForm/user-form.action";
import {useMutation} from "@tanstack/react-query";
import {toast} from "sonner";
import {useRouter} from "next/navigation";
import {useState} from "react";
import {Trash2} from "lucide-react";
import {deleteUserAction} from "@/components/wrappers/dashboard/Profile/ButtonDeleteAccount/delete-account.action";
import {deleteUserAction} from "@/components/wrappers/dashboard/profile/ButtonDeleteAccount/delete-account.action";
import {ButtonWithLoading} from "@/components/wrappers/common/button/ButtonWithLoading/ButtonWithLoading";
export const usersColumns: ColumnDef<User>[] = [
@@ -6,13 +6,13 @@ import {
SidebarMenu,
SidebarMenuItem,
} from "@/components/ui/sidebar"
import {LoggedInButton} from "@/components/wrappers/dashboard/LoggedInButton/LoggedInButton";
import {SidebarMenuCustom} from "@/components/wrappers/dashboard/SideBar/SideBarMenu/SideBarMenu";
import {OrganizationCombobox} from "@/components/wrappers/dashboard/Organization/organization-combobox";
import {SidebarMenuCustom} from "@/components/wrappers/dashboard/sideBar/SideBarMenu/SideBarMenu";
import {OrganizationCombobox} from "@/components/wrappers/dashboard/organization/organization-combobox";
import {prisma} from "@/prisma";
import {requiredCurrentUser} from "@/auth/current-user";
import {SideBarLogo} from "@/components/wrappers/Dashboard/SideBar/SideBarLogo/SideBarLogo";
import {SideBarFooterCredit} from "@/components/wrappers/Dashboard/SideBar/SideBarFooterCredit/SideBarFooterCredit";
import {SideBarLogo} from "@/components/wrappers/dashboard/sideBar/SideBarLogo/SideBarLogo";
import {SideBarFooterCredit} from "@/components/wrappers/dashboard/sideBar/SideBarFooterCredit/SideBarFooterCredit";
import {LoggedInButton} from "@/components/wrappers/dashboard/loggedInButton/LoggedInButton";
export async function AppSidebar() {
+2 -2
View File
@@ -1,7 +1,7 @@
"use client"
import {ColumnDef} from "@tanstack/react-table"
import {StatusBadge} from "@/components/wrappers/status-badge";
import {StatusBadge} from "@/components/wrappers/common/status-badge";
import {
DropdownMenu,
DropdownMenuContent,
@@ -18,7 +18,7 @@ import {useMutation} from "@tanstack/react-query";
import {createRestorationAction} from "@/features/restore/restore.action";
import {toast} from "sonner";
import {useRouter} from "next/navigation";
import {TooltipCustom} from "@/components/wrappers/TooltipCustom/TooltipCustom";
import {TooltipCustom} from "@/components/wrappers/common/tooltipCustom/TooltipCustom";
export const backupColumns: ColumnDef<Backup>[] = [
+1 -1
View File
@@ -1,9 +1,9 @@
import {notFound} from "next/navigation";
import {currentUser} from "@/auth/current-user";
import {LoggedInButton} from "@/components/wrappers/dashboard/LoggedInButton/LoggedInButton";
import {SidebarTrigger} from "@/components/ui/sidebar";
import {ModeToggle} from "@/features/theme/ModeToggle";
import {LoggedInButton} from "@/components/wrappers/dashboard/loggedInButton/LoggedInButton";
export const Header = async () => {
const user = await currentUser()
+1 -1
View File
@@ -1,7 +1,7 @@
"use client"
import {ColumnDef} from "@tanstack/react-table"
import {StatusBadge} from "@/components/wrappers/status-badge";
import {StatusBadge} from "@/components/wrappers/common/status-badge";
import {
DropdownMenu,
DropdownMenuContent,