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 @@
REACT_APP_MOD=production # REACT_APP_MOD=production
# REACT_APP_MOD=local REACT_APP_MOD=local
# Sentry logger setup # Sentry logger setup
SENTRY_ENVIROMENT=production # SENTRY_ENVIROMENT=production
# SENTRY_ENVIROMENT=develop SENTRY_ENVIROMENT=develop
# The SENTRY_AUTH_TOKEN variable is picked up by the Sentry Build Plugin. # The SENTRY_AUTH_TOKEN variable is picked up by the Sentry Build Plugin.
# It's used for authentication when uploading source maps. # 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";
import { CustomTableRow } from "@/components/TableGrid/components"; import { CustomTableRow } from "@/components/TableGrid/components";
import { LogsSelectedTableHeader } from "./logs-selected-table-header.component"; import { LogsSelectedTableHeader } from "./logs-selected-table-header.component";
import { ILog } from "@/shared/interfaces/log.interface"; import { ILog } from "@/shared/interfaces/log.interface";
interface IProps { interface IProps {
paginationList: any; paginationList: any;
selected: Partial<ILog>[]; selected: Partial<ILog>[];
@ -50,6 +51,10 @@ export const LogsTable = (props: IProps) => {
else props.setSelected(props.allLogs); else props.setSelected(props.allLogs);
}; };
const columns = columnsConfig(
(props?.paginationList?.loadParams?.page - 1 || 0) *
props?.paginationList?.loadParams?.limit
);
return ( return (
<div className="DataLogs"> <div className="DataLogs">
<div <div
@ -95,7 +100,7 @@ export const LogsTable = (props: IProps) => {
/> />
<Table <Table
tableName={"logs"} tableName={"logs"}
columns={[selectColumn, ...columnsConfig]} columns={[selectColumn, ...columns]}
// setSelectedRows={props.setSelectedIds} // setSelectedRows={props.setSelectedIds}
selectedRows={props.selected?.map((it) => it.id)} selectedRows={props.selected?.map((it) => it.id)}
paginationList={props.paginationList} paginationList={props.paginationList}

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

@ -5,7 +5,7 @@ import { voidColumn } from "@/components/TableGrid/configs/void-row.config";
import _ from "lodash"; import _ from "lodash";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
export const columnsConfig: any = [ export const columnsConfig: any = (page = 0) => [
voidColumn, voidColumn,
{ {
@ -16,9 +16,10 @@ export const columnsConfig: any = [
resizable: false, resizable: false,
sortable: true, sortable: true,
filter: true, filter: true,
formatter: ({ row }) => { formatter: ({ row, ...data }) => {
console.log(data);
if (_.isEmpty(row)) return ""; 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 = () => {
}} }}
> >
<div> <div>
<h4>Приховані користувачі</h4> <h4>Користувачі</h4>
</div> </div>
<div <div
style={{ style={{

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

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

Loading…
Cancel
Save