Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
1 change: 1 addition & 0 deletions app/(protected)/team/(team)/projects/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { ProjectsPage as default } from 'pages/team';
1 change: 1 addition & 0 deletions app/(protected)/team/projects/[projectId]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { ProjectBoardsPage as default } from 'pages/project';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { ProjectSettingsPage as default } from 'pages/project';
17 changes: 17 additions & 0 deletions app/projects/[projectId]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export default async function Page({
params,
searchParams,
}: {
params: Promise<{ projectId: string }>;
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
}) {
const { projectId } = await params;
const { token } = await searchParams;

return (
<div>
<div>Проект: {projectId}</div>
<div>Токен: {token}</div>
</div>
);
}
5 changes: 4 additions & 1 deletion components.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
"cssVariables": true,
"prefix": ""
},
"iconLibrary": "lucide",
"aliases": {
"components": "shared/ui",
"utils": "shared/lib/utils",
"ui": "shared/ui",
"lib": "shared/lib",
"hooks": "shared/hooks/shadcn"
},
"iconLibrary": "lucide"
"registries": {
"@kibo-ui": "https://www.kibo-ui.com/r/{name}.json"
}
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"prepare": "husky"
},
"dependencies": {
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@grafana/faro-web-sdk": "^2.4.0",
"@grafana/faro-web-tracing": "^2.4.0",
"@hookform/resolvers": "^5.2.2",
Expand All @@ -46,6 +49,7 @@
"socket.io-client": "^4.8.3",
"sonner": "^2.0.7",
"tailwind-merge": "^3.4.1",
"tunnel-rat": "^0.1.2",
"zod": "^4.3.6",
"zustand": "^5.0.11"
},
Expand Down
93 changes: 93 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app/layouts/PageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PageLayout as PageLayoutParent } from 'widgets/page-layout';
import { TabsNav } from 'widgets/tabs-nav';

interface PageLayoutProps extends Omit<ComponentProps<typeof PageLayoutParent>, 'nav'> {
tabs: ComponentProps<typeof TabsNav>['tabs'];
tabs?: ComponentProps<typeof TabsNav>['tabs'];
}

export function PageLayout({ children, tabs, ...props }: PageLayoutProps) {
Expand Down
4 changes: 2 additions & 2 deletions src/app/layouts/SidebarLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ export function SidebarLayout({ children, ...props }: ComponentProps<typeof Side
<SidebarProvider {...props}>
<TeamSlugSync />
<AppSidebar />
<SidebarInset>
<SidebarInset className="min-h-screen">
<header className="flex h-14 shrink-0 items-center gap-2 border-b px-4">
<SidebarTrigger className="-ml-1" />
<Separator
orientation="vertical"
className="mr-2 self-center! data-[orientation=vertical]:h-6"
/>
</header>
<div className="p-4">{children}</div>
<div className="h-full overflow-x-hidden">{children}</div>
</SidebarInset>
</SidebarProvider>
);
Expand Down
84 changes: 84 additions & 0 deletions src/entities/project/api/http.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import { api } from 'shared/api';
import * as SProject from '../model/schemas';
import * as TProject from '../model/types';

export class ProjectHttp {
static getProjects(teamSlug: string, signal?: AbortSignal) {
return api<TProject.ProjectListResponse>({
url: `/teams/${teamSlug}/projects`,
method: 'GET',
contracts: {
response: SProject.ProjectListResponse,
},
signal,
});
}

static getProject(teamSlug: string, id: string, token?: string, signal?: AbortSignal) {
return api<TProject.ProjectDetailResponse>({
url: `/teams/${teamSlug}/projects/${id}`,
method: 'GET',
params: token ? { token } : undefined,
contracts: {
response: SProject.ProjectDetailResponse,
},
signal,
});
}

static createProject(teamSlug: string, data: TProject.CreateProjectBody) {
return api<TProject.CreateProjectResponse>({
url: `/teams/${teamSlug}/projects`,
method: 'POST',
data,
contracts: {
body: SProject.CreateProjectBody,
response: SProject.CreateProjectResponse,
},
});
}

static updateProject(teamSlug: string, id: string, data: TProject.UpdateProjectBody) {
return api<TProject.ActionResponse>({
url: `/teams/${teamSlug}/projects/${id}`,
method: 'PATCH',
data,
contracts: {
body: SProject.UpdateProjectBody,
response: SProject.ActionResponse,
},
});
}

static removeProject(teamSlug: string, id: string) {
return api<TProject.ActionResponse>({
url: `/teams/${teamSlug}/projects/${id}`,
method: 'DELETE',
contracts: {
response: SProject.ActionResponse,
},
});
}

static archiveProject(teamSlug: string, id: string) {
return api<TProject.ActionResponse>({
url: `/teams/${teamSlug}/projects/${id}/archive`,
method: 'POST',
contracts: {
response: SProject.ActionResponse,
},
});
}

static createShareToken(teamSlug: string, id: string, data: TProject.CreateShareTokenBody = {}) {
return api<TProject.CreateShareTokenResponse>({
url: `/teams/${teamSlug}/projects/${id}/share`,
method: 'POST',
data,
contracts: {
body: SProject.CreateShareTokenBody,
response: SProject.CreateShareTokenResponse,
},
});
}
}
21 changes: 21 additions & 0 deletions src/entities/project/api/queries.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { queryOptions } from '@tanstack/react-query';
import { projectFabricKeys } from '../model/const';
import { ProjectHttp } from './http';

export class ProjectQueries {
static getProjects(teamSlug: string) {
return queryOptions({
queryKey: projectFabricKeys.list(teamSlug),
queryFn: async ({ signal }) => ProjectHttp.getProjects(teamSlug, signal),
staleTime: 60_000,
});
}

static getProject(teamSlug: string, id: string, token?: string) {
return queryOptions({
queryKey: [...projectFabricKeys.detail(teamSlug, id), token ?? null],
queryFn: async ({ signal }) => ProjectHttp.getProject(teamSlug, id, token, signal),
staleTime: 60_000,
});
}
}
14 changes: 14 additions & 0 deletions src/entities/project/config/colors.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export const PROJECT_COLORS = [
'#9FA8DA',
'#7E57C2',
'#9575CD',
'#AB47BC',
'#F06292',
'#FF8A65',
'#4FC3F7',
'#4DB6AC',
'#81C784',
'#DCE775',
'#FFF176',
'#FFB74D',
] as const;
42 changes: 42 additions & 0 deletions src/entities/project/config/icons.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
export const PROJECT_ICONS = [
'1F4C1', // 📁
'1F680', // 🚀
'1F41B', // 🐛
'26A1', // ⚡
'1F3AF', // 🎯
'1F4A1', // 💡
'1F527', // 🔧
'1F4CA', // 📊
'1F3A8', // 🎨
'1F512', // 🔒
'1F4F1', // 📱
'1F310', // 🌐
'2728', // ✨
'1F6E0-FE0F', // 🛠️
'1F4DD', // 📝
'1F3D7-FE0F', // 🏗️
'1F3AE', // 🎮
'1F4C8', // 📈
'1F525', // 🔥
'1F48E', // 💎
'1F31F', // 🌟
'1F4E6', // 📦
'1F9EA', // 🧪
'1F393', // 🎓
'1F3E0', // 🏠
'1F6E1-FE0F', // 🛡️
'1F916', // 🤖
'1F4E3', // 📣
'1F5C2-FE0F', // 🗂️
'23F1-FE0F', // ⏱️
'1F9E9', // 🧩
'1F3AA', // 🎪
'1F331', // 🌱
'1F6A2', // 🚢
'1F514', // 🔔
'1F4AC', // 💬
'1F4CC', // 📌
'1F3C6', // 🏆
'2699-FE0F', // ⚙️
'1F9E0', // 🧠
] as const;
Loading
Loading