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
25 changes: 0 additions & 25 deletions .env.production

This file was deleted.

4 changes: 2 additions & 2 deletions app/(protected)/team/(team)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { PageLayout } from 'app/layouts/PageLayout';
import { Badge } from 'shared/ui';
import { teamTabs } from 'pages/team';
import { Badge } from 'shared/ui';

export default function TeamLayout({ children }: { children: React.ReactNode }) {
return (
<PageLayout
title="Управление командой"
description="Управляйте участниками рабочего пространства, ожидающими приглашениями, ролями и правами доступа."
description="Управляйте участниками команды, ожидающими приглашениями, ролями и правами доступа."
badge={<Badge variant="secondary">8 участников</Badge>}
tabs={teamTabs}
>
Expand Down
1 change: 0 additions & 1 deletion app/(protected)/team/(team)/projects/page.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { notFound } from 'next/navigation';
import { BoardsPage } from 'pages/boards';

export default async function Page({
params,
}: {
params: Promise<{ boardSlug: string; projectSlug: string }>;
}) {
const { boardSlug, projectSlug } = await params;

if (!boardSlug || !projectSlug) {
return notFound();
}

return <BoardsPage projectSlug={projectSlug} boardSlug={boardSlug} />;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { notFound } from 'next/navigation';

export default async function Page({
params,
}: {
params: Promise<{ boardSlug: string; projectSlug: string }>;
}) {
const { boardSlug, projectSlug } = await params;

if (!boardSlug || !projectSlug) {
return notFound();
}

return (
<div>
настройки доски {boardSlug} проекта {projectSlug}
</div>
);
}
12 changes: 12 additions & 0 deletions app/(protected)/team/projects/[projectSlug]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { notFound } from 'next/navigation';
import { BoardsPage } from 'pages/boards';

export default async function Page({ params }: { params: Promise<{ projectSlug: string }> }) {
const { projectSlug } = await params;

if (!projectSlug) {
return notFound();
}

return <BoardsPage projectSlug={projectSlug} />;
}
11 changes: 11 additions & 0 deletions app/(protected)/team/projects/[projectSlug]/settings/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { notFound } from 'next/navigation';

export default async function Page({ params }: { params: Promise<{ projectSlug: string }> }) {
const { projectSlug } = await params;

if (!projectSlug) {
return notFound();
}

return <div>конфиг проекта {projectSlug}</div>;
}
1 change: 0 additions & 1 deletion app/(protected)/team/projects/[slug]/page.tsx

This file was deleted.

1 change: 0 additions & 1 deletion app/(protected)/team/projects/[slug]/settings/page.tsx

This file was deleted.

1 change: 1 addition & 0 deletions app/(protected)/team/projects/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { ProjectsPage as default } from 'pages/projects';
17 changes: 0 additions & 17 deletions app/projects/[projectId]/page.tsx

This file was deleted.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@
"react": "^19.2.4",
"react-dom": "^19.2.4",
"react-hook-form": "^7.71.2",
"react-indiana-drag-scroll": "^2.2.1",
"socket.io-client": "^4.8.3",
"sonner": "^2.0.7",
"tailwind-merge": "^3.4.1",
"tunnel-rat": "^0.1.2",
"vaul": "^1.1.2",
"zod": "^4.3.6",
"zustand": "^5.0.11"
},
Expand Down
51 changes: 51 additions & 0 deletions pnpm-lock.yaml

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

6 changes: 6 additions & 0 deletions src/entities/board/api/queries.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { queryOptions } from '@tanstack/react-query';
import { boardFabricKeys } from '../model/consts';
import { BoardColumnResponse } from '../model/types';
import { BoardHttp } from './http';

export class BoardQueries {
Expand All @@ -24,6 +25,11 @@ export class BoardQueries {
queryKey: boardFabricKeys.columns(slug),
queryFn: async ({ signal }) => BoardHttp.getBoardColumnList(slug, signal),
staleTime: 60_000,
select: (data) =>
data.reduce<Record<string, BoardColumnResponse>>((acc, el) => {
acc[el.id] = el;
return acc;
}, {}),
});
}

Expand Down
8 changes: 3 additions & 5 deletions src/entities/board/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
export type * as TBoard from './model/types';
export * as SBoard from './model/schemas';
export { boardFabricKeys } from './model/consts';
export { BoardHttp } from './api/http';
export { BoardQueries } from './api/queries';
export { BoardMapper, type KanbanBoardData } from './model/mapper';
export { BOARD_COLUMN_COLORS } from './config/colors';
export { useBoardStore } from './model/store';
export { boardFabricKeys } from './model/consts';
export * as SBoard from './model/schemas';
export type * as TBoard from './model/types';
51 changes: 0 additions & 51 deletions src/entities/board/model/mapper.ts

This file was deleted.

15 changes: 5 additions & 10 deletions src/entities/board/model/schemas.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { createSortingSchema, CursorQuerySchema, DateTimeString, GlobalSuccess } from 'shared/api';
import { z } from 'zod/v4';
import { HEX_COLOR_REGEX } from 'shared/lib/utils';

export const ActionResponse = GlobalSuccess;

Expand Down Expand Up @@ -37,10 +38,7 @@ export const Board = z.object({
descriptionHtml: z.string().nullable().optional(),
color: z
.string()
.regex(
/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,
'Цвет должен быть в HEX формате (#RRGGBB или #RGB)'
)
.regex(HEX_COLOR_REGEX, 'Цвет должен быть в HEX формате (#RRGGBB или #RGB)')
.nullable()
.optional(),
icon: z.string().max(20, 'Иконка должна быть не длиннее 20 символов').nullable().optional(),
Expand Down Expand Up @@ -77,17 +75,14 @@ export const BoardColumn = z.object({
category: BoardColumnCategoryEnum,
color: z
.string()
.regex(
/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,
'Цвет должен быть в HEX формате (#RRGGBB или #RGB)'
)
.regex(HEX_COLOR_REGEX, 'Цвет должен быть в HEX формате (#RRGGBB или #RGB)')
.nullable()
.optional(),
icon: z.string().max(20, 'Иконка должна быть не длиннее 20 символов').nullable().optional(),
position: z
.number()
.int('Порядковый номер должен быть целым числом')
.min(0, 'Порядковый номер не может быть отрицательным'),
.int('Позиция должна быть целым числом')
.min(0, 'Позиция не может быть отрицательной'),
isVisible: z.boolean(),
maxTasksLimit: z
.number()
Expand Down
Loading
Loading