diff --git a/frontend/src/app/profile/page.tsx b/frontend/src/app/profile/page.tsx index 58217c88..bc05dc19 100644 --- a/frontend/src/app/profile/page.tsx +++ b/frontend/src/app/profile/page.tsx @@ -6,6 +6,7 @@ import { KeyRound, Mail, MessageCircle, Phone, RefreshCw } from "lucide-react"; import { AppShell } from "@/components/AppShell"; import EmployeeAttendanceCard from "@/components/attendance/EmployeeAttendanceCard"; import EmployeeActionsTimeline from "@/components/users/EmployeeActionsTimeline"; +import EmployeePayrollWorkProfileSection from "@/components/users/EmployeePayrollWorkProfileSection"; import EmployeeRequestsProfileSections from "@/components/users/EmployeeRequestsProfileSections"; import { ProfileContactsPanel, @@ -197,6 +198,8 @@ export default function ProfilePage() { + + (null); @@ -176,7 +178,7 @@ export function PayrollDailyWorkSection({ if (loading && !workspace) { return ( -
+
); @@ -184,8 +186,8 @@ export function PayrollDailyWorkSection({ if (!workspace?.periods.length) { return ( -
-
+
+

Расчётные периоды пока не созданы.

@@ -211,11 +213,22 @@ export function PayrollDailyWorkSection({ const periodSelectorTarget = periodSelectorTargetId && typeof document !== "undefined" ? document.getElementById(periodSelectorTargetId) : null; + const cardClassName = embedded + ? "app-surface-muted rounded-xl p-4" + : "app-surface rounded-2xl p-4 sm:p-5"; return ( -
- {periodSelectorTarget ? createPortal(periodSelector, periodSelectorTarget) : null} -
+
+ {periodSelectorTarget ? createPortal(periodSelector, periodSelectorTarget) : ( +
+
+

Дата выработки

+

Выберите день нужного расчётного периода

+
+ {periodSelector} +
+ )} +
@@ -286,7 +299,7 @@ export function PayrollDailyWorkSection({
-
+

Выработка

Ежедневные баллы

@@ -321,7 +334,7 @@ export function PayrollDailyWorkSection({ ) : null}
-
+

Записи за период

{workspace.entries.length} diff --git a/frontend/src/components/users/EmployeePayrollWorkProfileSection.tsx b/frontend/src/components/users/EmployeePayrollWorkProfileSection.tsx new file mode 100644 index 00000000..4be13347 --- /dev/null +++ b/frontend/src/components/users/EmployeePayrollWorkProfileSection.tsx @@ -0,0 +1,51 @@ +"use client"; + +import { ChevronDown, TrendingUp } from "lucide-react"; +import { useState } from "react"; + +import { PayrollDailyWorkSection } from "@/components/finance/PayrollDailyWorkSection"; + +export default function EmployeePayrollWorkProfileSection() { + const [open, setOpen] = useState(false); + + const toggle = () => setOpen((current) => !current); + + return ( +
+
+ + + +
+ + {open ? ( +
+ +
+ ) : null} +
+ ); +}