From b72ac5dd0dcb8ad2241b36306825f1c27aea6358 Mon Sep 17 00:00:00 2001 From: lizerk Date: Tue, 10 Nov 2026 17:52:53 +0300 Subject: [PATCH] Format procurement and finance screens for quality gate --- frontend/src/app/procurement/page.tsx | 92 +++++++++++-------- .../finance/admin/PayrollAdminWorkspace.tsx | 14 ++- .../finance/admin/PayrollPeriodTable.tsx | 7 +- 3 files changed, 68 insertions(+), 45 deletions(-) diff --git a/frontend/src/app/procurement/page.tsx b/frontend/src/app/procurement/page.tsx index a382c97d..e588ae7b 100644 --- a/frontend/src/app/procurement/page.tsx +++ b/frontend/src/app/procurement/page.tsx @@ -159,9 +159,9 @@ const canConfirmAllReceived = ( ); return Boolean( isAuthor && - itemsCount > 0 && - request.fulfillment_status !== "completed" && - ["waiting", "in_progress"].includes(status), + itemsCount > 0 && + request.fulfillment_status !== "completed" && + ["waiting", "in_progress"].includes(status), ); }; @@ -308,7 +308,7 @@ function ProcurementRequestActionButtons({ const isInProgress = status === "in_progress"; const canNotifyArrival = Boolean( request.can_current_user_process_items && - (status === "waiting" || status === "in_progress"), + (status === "waiting" || status === "in_progress"), ); const canConfirmRequestReceived = canConfirmAllReceived(request, isAuthor); const startWorkLabel = request.executor @@ -663,9 +663,9 @@ export default function ProcurementPage() { return Boolean( request.can_current_user_submit_for_approval && - user?.id && - processingDepartmentId && - isProcessingDepartmentMember, + user?.id && + processingDepartmentId && + isProcessingDepartmentMember, ); }, [user?.id, userDepartmentIds, userDepartmentsKnown], @@ -1856,7 +1856,11 @@ export default function ProcurementPage() { > @@ -1947,7 +1951,11 @@ export default function ProcurementPage() { > { const canDeleteCommentThis = Boolean( comment.author?.id && - (user?.id === comment.author.id || - user?.auth?.is_staff || - user?.auth?.is_superuser), + (user?.id === comment.author.id || + user?.auth?.is_staff || + user?.auth?.is_superuser), ); return (
{ const canDeleteCommentThis = Boolean( comment.author?.id && - (user?.id === comment.author.id || - user?.auth?.is_staff || - user?.auth?.is_superuser), + (user?.id === comment.author.id || + user?.auth?.is_staff || + user?.auth?.is_superuser), ); return (
{ const canDeleteCommentThis = Boolean( comment.author?.id && - (user?.id === comment.author.id || - user?.auth?.is_staff || - user?.auth?.is_superuser), + (user?.id === comment.author.id || + user?.auth?.is_staff || + user?.auth?.is_superuser), ); return (
(null); const [workEntryLockBusy, setWorkEntryLockBusy] = useState(false); - const [workEntryLockError, setWorkEntryLockError] = useState(null); + const [workEntryLockError, setWorkEntryLockError] = useState( + null, + ); const [periodModalOpen, setPeriodModalOpen] = useState(false); const [editingPeriod, setEditingPeriod] = useState( @@ -1770,7 +1772,10 @@ export function PayrollAdminWorkspace({ ); } catch (error) { setWorkEntryLockError( - getPayrollAdminError(error, "Не удалось изменить доступ к выработке."), + getPayrollAdminError( + error, + "Не удалось изменить доступ к выработке.", + ), ); } finally { setWorkEntryLockBusy(false); @@ -1894,7 +1899,10 @@ export function PayrollAdminWorkspace({ ) : null} {workEntryLockError ? ( -
+
{workEntryLockError}
) : null} diff --git a/frontend/src/components/finance/admin/PayrollPeriodTable.tsx b/frontend/src/components/finance/admin/PayrollPeriodTable.tsx index 615bafbb..2fd6dfd5 100644 --- a/frontend/src/components/finance/admin/PayrollPeriodTable.tsx +++ b/frontend/src/components/finance/admin/PayrollPeriodTable.tsx @@ -2390,7 +2390,8 @@ export function PayrollPeriodTableView({ columnId: string, columnLabel: string, ) => ({ - commentPreview: commentPreviewByCell.get(commentCellKey(row.employee.id, columnId)) || "", + commentPreview: + commentPreviewByCell.get(commentCellKey(row.employee.id, columnId)) || "", commentCount: commentCountByCell.get(commentCellKey(row.employee.id, columnId)) || 0, onOpenComment: () => @@ -3779,7 +3780,9 @@ export function PayrollPeriodTableView({ style={{ left: REVIEW_MARK_COLUMN_WIDTH }} >