From 7bbc1189ec96643b19e54c9315ad4108287f053b Mon Sep 17 00:00:00 2001 From: PotapovaA Date: Wed, 16 Sep 2026 12:15:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=D0=B0=20=D0=B4=D0=BE=D1=81=D1=82=D1=83=D0=BF=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D0=B5=D0=BB=D0=B9=20=D0=B4=D1=84=D0=B8=D0=BF=D0=B0,=20=D0=BE?= =?UTF-8?q?=D1=82=D1=81=D1=83=D0=BF=D1=8B=20=D0=B4=D0=BB=D1=8F=20=D1=81?= =?UTF-8?q?=D0=BC=D0=B5=D1=82=20=D0=B8=20-=20=D0=B2=D0=BC=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=BE=200=20=D0=B2=20SummaryTable=20(=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B5=D0=BA=D1=82=D1=8B)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/HeaderMenu/HeaderSwitch.jsx | 4 +- .../RealtimeTable/Cell/Cell/Cell.jsx | 2 +- web/src/pages/ProjectPages/columns.js | 93 ++++++++++--------- 3 files changed, 52 insertions(+), 47 deletions(-) diff --git a/web/src/components/HeaderMenu/HeaderSwitch.jsx b/web/src/components/HeaderMenu/HeaderSwitch.jsx index cec6291..e01c556 100644 --- a/web/src/components/HeaderMenu/HeaderSwitch.jsx +++ b/web/src/components/HeaderMenu/HeaderSwitch.jsx @@ -68,7 +68,7 @@ export function HeaderSwitch() { Задачи - {(user.is_executor_rf || user.role_id === ROLES_NAME_ID.admin || user.role_id === ROLES_NAME_ID.executor_durrs) && + {(user.is_executor_rf || user.role_id === ROLES_NAME_ID.admin || user.role_id === ROLES_NAME_ID.executor_durrs || user.role_id === ROLES_NAME_ID.executor_dfip) &&
@@ -95,7 +95,7 @@ export function HeaderSwitch() { Администрирование )} - {(user.is_executor_rf || user.role_id === ROLES_NAME_ID.admin) && + {(user.is_executor_rf || user.role_id === ROLES_NAME_ID.admin || user.role_id === ROLES_NAME_ID.executor_dfip) &&
diff --git a/web/src/components/RealtimeTable/Cell/Cell/Cell.jsx b/web/src/components/RealtimeTable/Cell/Cell/Cell.jsx index 3324887..da3704c 100644 --- a/web/src/components/RealtimeTable/Cell/Cell/Cell.jsx +++ b/web/src/components/RealtimeTable/Cell/Cell/Cell.jsx @@ -141,7 +141,7 @@ const CellComponent = ({ cell, row, column, onClick, globalFilter, columnFilter, const isLocked = useCellLock(cellKey); const isVspDropdown = column?.columnDef?.editType === 'vsp_dropdown'; - const nameIndent = column.id === 'data.header.name' ? 8 + row.depth * 16 : 8; + const nameIndent = column.id === 'data.header.name' || column.id === 'data.name' ? 8 + row.depth * 16 : 8; const { rawValue, displayValue, isNumeric } = useMemo(() => { const value = cell.getValue(); diff --git a/web/src/pages/ProjectPages/columns.js b/web/src/pages/ProjectPages/columns.js index a495e1e..7b8c18e 100644 --- a/web/src/pages/ProjectPages/columns.js +++ b/web/src/pages/ProjectPages/columns.js @@ -210,25 +210,25 @@ export const secondColumns = [ accessorKey: 'data.financing.ahr', header: 'АХР', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.financing.ahr_limit', header: 'АХР лимит', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.financing.ahr_current', header: 'АХР текущие', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.financing.kv', header: 'кв.', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, ], }, @@ -240,25 +240,25 @@ export const secondColumns = [ accessorKey: 'data.base_q1.ahr', header: 'АХР', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.base_q1.ahr_limit', header: 'АХР лимит', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.base_q1.ahr_current', header: 'АХР текущие', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.base_q1.kv', header: 'кв.', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, ], }, @@ -270,25 +270,25 @@ export const secondColumns = [ accessorKey: 'data.corrected_q2.ahr', header: 'АХР', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.corrected_q2.ahr_limit', header: 'АХР лимит', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.corrected_q2.ahr_current', header: 'АХР текущие', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.corrected_q2.kv', header: 'кв.', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, ], }, @@ -300,25 +300,25 @@ export const secondColumns = [ accessorKey: 'data.corrected_q3.ahr', header: 'АХР', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.corrected_q3.ahr_limit', header: 'АХР лимит', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.corrected_q3.ahr_current', header: 'АХР текущие', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.corrected_q3.kv', header: 'кв.', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, ], }, @@ -330,25 +330,25 @@ export const secondColumns = [ accessorKey: 'data.corrected_q4.ahr', header: 'АХР', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.corrected_q4.ahr_limit', header: 'АХР лимит', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.corrected_q4.ahr_current', header: 'АХР текущие', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.corrected_q4.kv', header: 'кв.', size: 100, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, ], }, @@ -363,19 +363,19 @@ export const secondColumns = [ accessorKey: 'data.actual_ahr.q1.ahr', header: 'Фактические расходы', size: 120, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_ahr.q1.ahr_limit', header: 'Лимит', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_ahr.q1.ahr_current', header: 'Текущие', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, ], }, @@ -386,19 +386,19 @@ export const secondColumns = [ accessorKey: 'data.actual_ahr.q2.ahr', header: 'Фактические расходы', size: 120, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_ahr.q2.ahr_limit', header: 'Лимит', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_ahr.q2.ahr_current', header: 'Текущие', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, ], }, @@ -409,19 +409,19 @@ export const secondColumns = [ accessorKey: 'data.actual_ahr.q3.ahr', header: 'Фактические расходы', size: 120, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_ahr.q3.ahr_limit', header: 'Лимит', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_ahr.q3.ahr_current', header: 'Текущие', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, ], }, @@ -432,19 +432,19 @@ export const secondColumns = [ accessorKey: 'data.actual_ahr.q4.ahr', header: 'Фактические расходы', size: 120, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_ahr.q4.ahr_limit', header: 'Лимит', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_ahr.q4.ahr_current', header: 'Текущие', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, ], }, @@ -461,19 +461,19 @@ export const secondColumns = [ accessorKey: 'data.actual_kv.q1.kv', header: 'Фактические расходы', size: 120, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_kv.q1.kv_limit', header: 'Лимит', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_kv.q1.kv_current', header: 'Текущие', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, ], }, @@ -484,19 +484,19 @@ export const secondColumns = [ accessorKey: 'data.actual_kv.q2.kv', header: 'Фактические расходы', size: 120, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_kv.q2.kv_limit', header: 'Лимит', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_kv.q2.kv_current', header: 'Текущие', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, ], }, @@ -507,19 +507,19 @@ export const secondColumns = [ accessorKey: 'data.actual_kv.q3.kv', header: 'Фактические расходы', size: 120, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_kv.q3.kv_limit', header: 'Лимит', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_kv.q3.kv_current', header: 'Текущие', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, ], }, @@ -530,19 +530,19 @@ export const secondColumns = [ accessorKey: 'data.actual_kv.q4.kv', header: 'Фактические расходы', size: 120, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_kv.q4.kv_limit', header: 'Лимит', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, { accessorKey: 'data.actual_kv.q4.kv_current', header: 'Текущие', size: 80, - Cell: ({ cell }) => formatNumber(cell.getValue()), + Cell: ({ cell }) => formatSummaryNumber(cell.getValue()), }, ], }, @@ -565,3 +565,8 @@ const formatNumber = (value) => { const number = Number(value); return Number.isNaN(number) ? value : number.toLocaleString('ru-RU'); }; + +const formatSummaryNumber = (value) => { + if (value !== null && value !== undefined && value !== '' && Number(value) === 0) return '-'; + return formatNumber(value); +};