From fca54f3a4f70b7ea7757fa271c5612f58b400a46 Mon Sep 17 00:00:00 2001 From: Vitalik Date: Tue, 10 Sep 2024 13:17:26 +0300 Subject: [PATCH] fix: ips sortngs & secret changes --- .env | 8 ++++---- src/containers/Logs/components/Data/index.tsx | 7 ++++++- src/containers/Logs/configs/columns.config.tsx | 7 ++++--- .../SecretMod/components/users-table-header.component.tsx | 2 +- .../secret-mod-controller.widget.tsx | 2 +- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.env b/.env index 9804210..fdcade0 100644 --- a/.env +++ b/.env @@ -1,10 +1,10 @@ -REACT_APP_MOD=production -# REACT_APP_MOD=local +# REACT_APP_MOD=production +REACT_APP_MOD=local # Sentry logger setup -SENTRY_ENVIROMENT=production -# SENTRY_ENVIROMENT=develop +# SENTRY_ENVIROMENT=production +SENTRY_ENVIROMENT=develop # The SENTRY_AUTH_TOKEN variable is picked up by the Sentry Build Plugin. # It's used for authentication when uploading source maps. diff --git a/src/containers/Logs/components/Data/index.tsx b/src/containers/Logs/components/Data/index.tsx index 080627c..eada9e0 100644 --- a/src/containers/Logs/components/Data/index.tsx +++ b/src/containers/Logs/components/Data/index.tsx @@ -11,6 +11,7 @@ import classNames from "classnames"; import { CustomTableRow } from "@/components/TableGrid/components"; import { LogsSelectedTableHeader } from "./logs-selected-table-header.component"; import { ILog } from "@/shared/interfaces/log.interface"; + interface IProps { paginationList: any; selected: Partial[]; @@ -50,6 +51,10 @@ export const LogsTable = (props: IProps) => { else props.setSelected(props.allLogs); }; + const columns = columnsConfig( + (props?.paginationList?.loadParams?.page - 1 || 0) * + props?.paginationList?.loadParams?.limit + ); return (
{ /> it.id)} paginationList={props.paginationList} diff --git a/src/containers/Logs/configs/columns.config.tsx b/src/containers/Logs/configs/columns.config.tsx index 9c736a9..9952cc2 100644 --- a/src/containers/Logs/configs/columns.config.tsx +++ b/src/containers/Logs/configs/columns.config.tsx @@ -5,7 +5,7 @@ import { voidColumn } from "@/components/TableGrid/configs/void-row.config"; import _ from "lodash"; import { Link } from "react-router-dom"; -export const columnsConfig: any = [ +export const columnsConfig: any = (page = 0) => [ voidColumn, { @@ -16,9 +16,10 @@ export const columnsConfig: any = [ resizable: false, sortable: true, filter: true, - formatter: ({ row }) => { + formatter: ({ row, ...data }) => { + console.log(data); if (_.isEmpty(row)) return ""; - return
{row.id}
; + return
{page + data.rowIdx + 1}
; }, }, { diff --git a/src/containers/SecretMod/components/users-table-header.component.tsx b/src/containers/SecretMod/components/users-table-header.component.tsx index e290dbb..9632e95 100644 --- a/src/containers/SecretMod/components/users-table-header.component.tsx +++ b/src/containers/SecretMod/components/users-table-header.component.tsx @@ -17,7 +17,7 @@ export const UsersTableHeader = () => { }} >
-

Приховані користувачі

+

Користувачі

{
-

Прихований режим

+

Технічний режим

{isLoading ? ( Завантаження ) : (