mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
refactor(projects): reorganize into actions/components/schemas
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { PageParams } from "@/types/next";
|
||||
import { Page, PageContent, PageTitle } from "@/features/layout/components/page";
|
||||
import { ButtonDeleteProject } from "@/features/projects/project-delete-button";
|
||||
import { ButtonDeleteProject } from "@/features/projects/components/project-delete-button";
|
||||
import { CardsWithPagination } from "@/components/common/cards-with-pagination";
|
||||
import { ProjectDatabaseCard } from "@/features/projects/project-database-card";
|
||||
import { ProjectDatabaseCard } from "@/features/projects/components/project-database-card";
|
||||
import { notFound, redirect } from "next/navigation";
|
||||
import { db } from "@/db";
|
||||
import { eq } from "drizzle-orm";
|
||||
import { getActiveMember, getOrganization } from "@/lib/auth/auth";
|
||||
import * as drizzleDb from "@/db";
|
||||
import { capitalizeFirstLetter, isUUID } from "@/utils/text";
|
||||
import { ProjectDialog } from "@/features/projects/project-dialog";
|
||||
import { ProjectDialog } from "@/features/projects/components/project-dialog";
|
||||
import { ProjectWith } from "@/db/schema/06_project";
|
||||
import { getOrganizationAvailableDatabases } from "@/db/services/database";
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import {PageParams} from "@/types/next";
|
||||
import {CardsWithPagination} from "@/components/common/cards-with-pagination";
|
||||
import {Page, PageActions, PageContent, PageHeader, PageTitle} from "@/features/layout/components/page";
|
||||
import {ProjectCard} from "@/features/projects/project-card";
|
||||
import {ProjectCard} from "@/features/projects/components/project-card";
|
||||
import {db} from "@/db";
|
||||
import {notFound} from "next/navigation";
|
||||
import {getActiveMember, getOrganization} from "@/lib/auth/auth";
|
||||
import {EmptyStatePlaceholder} from "@/components/common/empty-state-placeholder";
|
||||
import {Metadata} from "next";
|
||||
import {ProjectDialog} from "@/features/projects/project-dialog";
|
||||
import {ProjectDialog} from "@/features/projects/components/project-dialog";
|
||||
import {DatabaseWith} from "@/db/schema/07_database";
|
||||
import {getOrganizationAvailableDatabases} from "@/db/services/database";
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { toast } from "sonner";
|
||||
import {
|
||||
createProjectAction,
|
||||
updateProjectAction,
|
||||
} from "@/features/projects/projects.action";
|
||||
} from "@/features/projects/actions/projects.action";
|
||||
import type { OnboardingProjectData } from "@/features/onboarding/types";
|
||||
|
||||
type ProjectInput = { name: string; databaseIds: string[] };
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
"use server";
|
||||
|
||||
import {userAction} from "@/lib/safe-actions/actions";
|
||||
import {ProjectSchema} from "@/features/projects/projects.schema";
|
||||
import {ProjectSchema} from "@/features/projects/schemas/projects.schema";
|
||||
import {z} from "zod";
|
||||
import {ServerActionResult} from "@/types/action-type";
|
||||
import {db} from "@/db";
|
||||
+1
-1
@@ -5,7 +5,7 @@ import {ButtonWithConfirm} from "@/components/common/button-with-confirm";
|
||||
import {useMutation} from "@tanstack/react-query";
|
||||
import {
|
||||
deleteProjectAction
|
||||
} from "@/features/projects/project-delete.action";
|
||||
} from "@/features/projects/actions/project-delete.action";
|
||||
import {useRouter} from "next/navigation";
|
||||
import {toast} from "sonner";
|
||||
import {useIsMobile} from "@/hooks/use-mobile";
|
||||
+1
-1
@@ -7,7 +7,7 @@ import {
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from "@/components/ui/dialog";
|
||||
import {ProjectForm} from "@/features/projects/project-form";
|
||||
import {ProjectForm} from "@/features/projects/components/project-form";
|
||||
import {ReactNode, useState} from "react";
|
||||
import {Button, buttonVariants} from "@/components/ui/button";
|
||||
import {Plus} from "lucide-react";
|
||||
+2
-2
@@ -5,8 +5,8 @@ import { Input } from "@/components/ui/input";
|
||||
import { Form } from "@/components/ui/form";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
import { ProjectSchema, ProjectType } from "@/features/projects/projects.schema";
|
||||
import { createProjectAction, updateProjectAction } from "@/features/projects/projects.action";
|
||||
import { ProjectSchema, ProjectType } from "@/features/projects/schemas/projects.schema";
|
||||
import { createProjectAction, updateProjectAction } from "@/features/projects/actions/projects.action";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { MultiSelect } from "@/components/common/multi-select";
|
||||
import { toast } from "sonner";
|
||||
Reference in New Issue
Block a user