Browse Source

fix: ips sortngs & secret changes

stage
Vitalik 2 months ago
parent
commit
fca54f3a4f
  1. 8
      .env
  2. 7
      src/containers/Logs/components/Data/index.tsx
  3. 7
      src/containers/Logs/configs/columns.config.tsx
  4. 2
      src/containers/SecretMod/components/users-table-header.component.tsx
  5. 2
      src/containers/SecretMod/widgets/secret-mod-controller/secret-mod-controller.widget.tsx

8
.env

@ -1,10 +1,10 @@ @@ -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.

7
src/containers/Logs/components/Data/index.tsx

@ -11,6 +11,7 @@ import classNames from "classnames"; @@ -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<ILog>[];
@ -50,6 +51,10 @@ export const LogsTable = (props: IProps) => { @@ -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 (
<div className="DataLogs">
<div
@ -95,7 +100,7 @@ export const LogsTable = (props: IProps) => { @@ -95,7 +100,7 @@ export const LogsTable = (props: IProps) => {
/>
<Table
tableName={"logs"}
columns={[selectColumn, ...columnsConfig]}
columns={[selectColumn, ...columns]}
// setSelectedRows={props.setSelectedIds}
selectedRows={props.selected?.map((it) => it.id)}
paginationList={props.paginationList}

7
src/containers/Logs/configs/columns.config.tsx

@ -5,7 +5,7 @@ import { voidColumn } from "@/components/TableGrid/configs/void-row.config"; @@ -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 = [ @@ -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 <div className="ellipsis">{row.id}</div>;
return <div className="ellipsis">{page + data.rowIdx + 1}</div>;
},
},
{

2
src/containers/SecretMod/components/users-table-header.component.tsx

@ -17,7 +17,7 @@ export const UsersTableHeader = () => { @@ -17,7 +17,7 @@ export const UsersTableHeader = () => {
}}
>
<div>
<h4>Приховані користувачі</h4>
<h4>Користувачі</h4>
</div>
<div
style={{

2
src/containers/SecretMod/widgets/secret-mod-controller/secret-mod-controller.widget.tsx

@ -12,7 +12,7 @@ export const SecretModControllerWidget = () => { @@ -12,7 +12,7 @@ export const SecretModControllerWidget = () => {
<CardBody>
<div className="header">
<div className="custom-row">
<h3>Прихований режим</h3>
<h3>Технічний режим</h3>
{isLoading ? (
<Tag color="processing">Завантаження</Tag>
) : (

Loading…
Cancel
Save