style upfate pagination

main
Dilmurod 2 months ago
parent 8cbe5f9939
commit c3b922a083

@ -827,14 +827,14 @@
) !important; /* Используйте нужный вам цвет фона */
}
.ant-pagination {
/* .ant-pagination {
position: fixed;
bottom: 90px;
bottom: 0;
right: 20px;
color: #f99e2c;
}
} */
.ant-pagination-item-active {
/* .ant-pagination-item-active {
background-color: #f99e2c;
color: white;
}
@ -854,17 +854,16 @@
}
.ant-pagination .ant-pagination-item-active:hover {
border-color: #f99e3c;
}
} */
.ant-pagination-prev,
/* .ant-pagination-prev,
.ant-pagination-next {
width: 40px;
height: 32px;
background-color: #fff;
border: 1px solid #d7d8e0;
border-radius: 8px;
background-color: transparent;
}
} */
.btn-refresh-dark img {
animation: none;
@ -888,10 +887,6 @@
animation: spin 1s linear;
}
.ant-btn-default {
color: #0f111c;
}
@keyframes spin {
0% {
transform: rotate(0deg);

@ -391,6 +391,7 @@ const App: React.FC = () => {
onCollapse={toggleCollapsed}
style={{
height: "100vh",
zIndex: 9999,
background:
theme === true ? "#202020" : "rgba(20, 22, 41, 1)",
}}

@ -1,7 +1,12 @@
import React from "react";
import { Button, Card, Input, Space } from "antd";
import { Form, Field } from "react-final-form";
import { LockOutlined, UserOutlined } from "@ant-design/icons";
import {
EyeInvisibleOutlined,
EyeTwoTone,
LockOutlined,
UserOutlined,
} from "@ant-design/icons";
import { LoginApi } from "../API/auth/Login";
import { Link } from "react-router-dom";
@ -25,7 +30,12 @@ const Login: React.FC = () => {
};
return (
<div className="ContainerClassName" style={{ height: "100vh" }}>
<div
className="ContainerClassName"
style={{
height: "100vh",
}}
>
<Form
onSubmit={onSubmit}
validate={validate}
@ -42,7 +52,7 @@ const Login: React.FC = () => {
}}
>
<Card
bodyStyle={{ background: "rgb(250, 250, 250)" }}
bodyStyle={{ backgroundColor: "rgb(250, 250, 250)" }}
title="Login"
className="login-form-card "
style={{ width: 400 }}
@ -84,6 +94,13 @@ const Login: React.FC = () => {
{...input}
type="password"
placeholder="Password"
iconRender={(visible) =>
visible ? (
<EyeTwoTone style={{ color: "#bbb" }} />
) : (
<EyeInvisibleOutlined style={{ color: "#bbb" }} />
)
}
/>
{meta.error && meta.touched && (
<span style={{ color: "red" }}>{meta.error}</span>

@ -1,4 +1,4 @@
import { Button, Input, Modal, Space, Table } from "antd";
import { Button, Input, Modal, Space, Table, theme } from "antd";
import { TCall } from "../../types/CallRequests/TCall";
import { EditOutlined } from "@ant-design/icons";
// @ts-ignore
@ -12,6 +12,7 @@ import {
} from "react-query";
import { useState } from "react";
import { TPagination } from "../../types/common/TPagination";
import useToken from "antd/es/theme/useToken";
const CallTable = ({
data,
isLoading,
@ -57,6 +58,9 @@ const CallTable = ({
const handleNoteChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setNote(e.target.value);
};
const { token } = theme.useToken();
return (
<div>
<Table
@ -134,7 +138,22 @@ const CallTable = ({
index % 2 === 0 ? "odd-row" : "even-row"
}
scroll={{ x: "768px" }}
pagination={{ pageSize: 10, size: "default" }}
pagination={{
pageSize: 10,
size: "default",
style: {
margin: 0,
justifyContent: "end",
position: "fixed",
bottom: 0,
left: 0,
width: "100%",
backgroundColor: token.colorBgContainer,
boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
padding: "10px 0",
zIndex: 1000,
},
}}
bordered
/>
</div>

@ -1,9 +1,16 @@
import { useRef, useState } from "react";
import AddCompany from "./AddCompanies";
import CompanyTable from "./CompaniesTable";
import { StepForwardOutlined, StepBackwardOutlined } from "@ant-design/icons";
import {
StepForwardOutlined,
StepBackwardOutlined,
LeftOutlined,
RightOutlined,
} from "@ant-design/icons";
import { useCompanyPaginated } from "../../Hooks/Companies";
import { Button, Input, Space, Typography } from "antd";
import { Button, Input, Pagination, Space, Typography } from "antd";
import { theme } from "antd";
// @ts-ignore
import IconSearch from "../../assets/searchIcon.png";
//@ts-ignore
@ -50,7 +57,15 @@ const Company = () => {
}
};
const theme = localStorage.getItem("theme") === "true" ? true : false;
const { token } = theme.useToken();
const page_size = 15;
const handlePageChange = (page: number) => {
setPage(page);
};
const themes = localStorage.getItem("theme") === "true" ? true : false;
return (
<div>
@ -72,7 +87,7 @@ const Company = () => {
<div className="search-div">
<img src={IconSearch} alt="" />
<input
className={`search-input-${theme}`}
className={`search-input-${themes}`}
type="text"
placeholder="Search"
onChange={handleSearchChange}
@ -81,13 +96,43 @@ const Company = () => {
</div>
<CompanyTable data={data?.data} isLoading={isLoading} />
{/* <Space style={{ width: "100%", marginTop: 10 }} direction="vertical">
<Space style={{ width: "100%", justifyContent: "flex-end" }} wrap>
<Button onClick={Previos} disabled={data?.previous ? false : true}>
<img src={leftPagination} />
<Space style={{ width: "100%", marginTop: 10 }} direction="vertical">
<Space
style={{
justifyContent: "end",
position: "fixed",
bottom: 0,
left: 0,
width: "100%",
backgroundColor: token.colorBgContainer,
boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
padding: "10px 0",
zIndex: 1000,
}}
wrap
>
<Button
onClick={Previos}
disabled={data?.previous ? false : true}
style={{
backgroundColor: token.colorBgContainer,
color: token.colorText,
border: "none",
}}
>
<LeftOutlined />
</Button>
<Input
style={{ width: 30, textAlign: "center" }}
disabled
style={{
width: 40,
textAlign: "center",
background: token.colorBgContainer,
border: "1px solid",
borderColor: token.colorText,
color: token.colorText,
cursor: "pointer",
}}
value={page}
onChange={(e) => {
let num = e.target.value;
@ -96,11 +141,25 @@ const Company = () => {
}
}}
/>
<Button onClick={Next} disabled={data?.next ? false : true}>
<img src={rightPagination} />
<Button
onClick={Next}
disabled={data?.next ? false : true}
style={{
backgroundColor: token.colorBgContainer,
color: token.colorText,
border: "none",
}}
>
<RightOutlined />
</Button>
{/* <Pagination
current={page}
total={data?.page_size}
pageSize={page_size}
onChange={handlePageChange}
/> */}
</Space>
</Space> */}
</Space>
</div>
);
};

@ -18,6 +18,8 @@ import tt from "../../assets/tticon.svg";
import tagIcon from "../../assets/tagIcon.png";
import { role } from "../../App";
import { theme } from "antd";
function CompanyTable({
data,
isLoading,
@ -35,6 +37,8 @@ function CompanyTable({
}
}
const { token } = theme.useToken();
const getImageSource = (source: string) => {
switch (source) {
case "Zippy":
@ -139,10 +143,23 @@ function CompanyTable({
}
size="small"
scroll={{ x: "768px" }}
pagination={{
pageSize: 10,
size: "default",
}}
// pagination={{
// pageSize: 10,
// size: "default",
// style: {
// margin: 0,
// justifyContent: "end",
// position: "fixed",
// bottom: 0,
// left: 0,
// width: "100%",
// backgroundColor: token.colorBgContainer,
// boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
// padding: "10px 0",
// zIndex: 1000,
// },
// }}
pagination={false}
bordered
/>
</div>

@ -1,16 +1,16 @@
import { useRef, useState } from "react";
import AddCustomer from "./AddCustomer";
import CustomerTable from "./CustomersTable";
import { StepForwardOutlined, StepBackwardOutlined } from "@ant-design/icons";
import { LeftOutlined, RightOutlined } from "@ant-design/icons";
import { useCustomerData } from "../../Hooks/Customers";
//@ts-ignore
import addicon from "../../assets/addiconpng.png";
// @ts-ignore
import leftPagination from "../../assets/pagination-left.png";
import rightPagination from "../../assets/right-pagination.png";
import IconSearch from "../../assets/searchIcon.png";
import { Button, Input, Space, Typography } from "antd";
import { Button, Input, Pagination, Space, Typography } from "antd";
import { theme } from "antd";
const Customer = () => {
const [open, setOpen] = useState(false);
@ -19,6 +19,14 @@ const Customer = () => {
setOpen(true);
};
const page_size = 10;
const handlePageChange = (page: number) => {
setPage(page);
};
const { token } = theme.useToken();
const [search, setSearch] = useState("");
const { data, isLoading, refetch } = useCustomerData({
name: search,
@ -50,7 +58,7 @@ const Customer = () => {
setSearch(searchText);
}, 1000);
};
const theme = localStorage.getItem("theme") === "true" ? true : false;
const themes = localStorage.getItem("theme") === "true" ? true : false;
return (
<div>
@ -66,7 +74,7 @@ const Customer = () => {
<div className="search-div">
<img src={IconSearch} alt="" />
<input
className={`search-input-${theme}`}
className={`search-input-${themes}`}
type="text"
placeholder="Search"
onChange={handleSearchChange}
@ -74,13 +82,43 @@ const Customer = () => {
</div>
</div>
<CustomerTable data={data?.data} isLoading={isLoading} />
{/* <Space style={{ width: "100%", marginTop: 10 }} direction="vertical">
<Space style={{ width: "100%", justifyContent: "flex-end" }} wrap>
<Button onClick={Previos} disabled={!data?.previous}>
<img src={leftPagination} />
<Space style={{ width: "100%", marginTop: 10 }} direction="vertical">
<Space
style={{
justifyContent: "end",
position: "fixed",
bottom: 0,
left: 0,
width: "100%",
backgroundColor: token.colorBgContainer,
boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
padding: "10px 0",
zIndex: 1000,
}}
wrap
>
<Button
type="primary"
onClick={Previos}
disabled={!data?.previous}
style={{
backgroundColor: token.colorBgContainer,
color: token.colorText,
border: "none",
}}
>
<LeftOutlined />
</Button>
<Input
style={{ width: 30, textAlign: "center" }}
disabled
style={{
width: 40,
textAlign: "center",
background: token.colorBgContainer,
border: "1px solid",
borderColor: token.colorText,
color: token.colorText,
}}
value={page}
onChange={(e) => {
let num = e.target.value;
@ -89,11 +127,27 @@ const Customer = () => {
}
}}
/>
<Button onClick={Next} disabled={!data?.next}>
<img src={rightPagination} />
<Button
type="primary"
onClick={Next}
disabled={!data?.next}
style={{
backgroundColor: token.colorBgContainer,
color: token.colorText,
border: "none",
}}
>
<RightOutlined />
</Button>
{/* <Pagination
current={page}
total={10}
pageSize={page_size}
onChange={handlePageChange}
/> */}
</Space>
</Space> */}
</Space>
</div>
);
};

@ -15,6 +15,9 @@ import ontime from "../../assets/ontimeicon.svg";
import tt from "../../assets/tticon.svg";
import { role } from "../../App";
import { theme } from "antd";
import { useState } from "react";
function CustomerTable({
data,
isLoading,
@ -26,6 +29,11 @@ function CustomerTable({
id: number;
};
const { token } = theme.useToken();
const [pageSize, setPageSize] = useState(10); // Default sahifa hajmi
const [currentPage, setCurrentPage] = useState(1);
const Row = (record: RowProps) => {
return {
onClick: () => {
@ -95,11 +103,24 @@ function CustomerTable({
}
size="middle"
bordered
pagination={{
pageSize: 10,
size: "default",
}}
// pagination={{
// pageSize: 10,
// size: "default",
// style: {
// margin: 0,
// justifyContent: "end",
// position: "fixed",
// bottom: 0,
// left: 0,
// width: "100%",
// backgroundColor: token.colorBgContainer,
// boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
// padding: "10px 0",
// zIndex: 1000,
// },
// }}
scroll={{ x: "768px" }}
pagination={false}
/>
</div>
);

@ -178,7 +178,7 @@ const Profile = () => {
</Form>
)}
<div className="">
<h2 style={{ marginBottom: 20 }}>Your Statistics</h2>
<h2 style={{ marginBottom: 20 }}>My Statistics</h2>
<div
style={{
display: "flex",

@ -1,6 +1,11 @@
import { useEffect, useRef, useState } from "react";
import { useRequestsData } from "../../Hooks/Requests";
import { StepForwardOutlined, StepBackwardOutlined } from "@ant-design/icons";
import {
StepForwardOutlined,
StepBackwardOutlined,
LeftOutlined,
RightOutlined,
} from "@ant-design/icons";
import {
Button,
Input,
@ -8,6 +13,7 @@ import {
RadioChangeEvent,
Space,
Typography,
theme,
} from "antd";
import { TRequests } from "../../types/Requests/TRequests";
import { TSocket } from "../../types/common/TSocket";
@ -43,7 +49,7 @@ const Requests = ({ socketData }: { socketData: TSocket | undefined }) => {
}, 1000);
};
const theme = localStorage.getItem("theme") === "true" ? true : false;
const themes = localStorage.getItem("theme") === "true" ? true : false;
useEffect(() => {
if (data) {
@ -75,6 +81,9 @@ const Requests = ({ socketData }: { socketData: TSocket | undefined }) => {
setPage(a);
}
};
const { token } = theme.useToken();
return (
<div>
{modalOpen && (
@ -92,7 +101,7 @@ const Requests = ({ socketData }: { socketData: TSocket | undefined }) => {
<div className="search-div">
<img src={IconSearch} alt="" />
<input
className={`search-input-${theme}`}
className={`search-input-${themes}`}
type="text"
placeholder="Search"
onChange={handleSearchChange}
@ -117,13 +126,41 @@ const Requests = ({ socketData }: { socketData: TSocket | undefined }) => {
setRequestData={setRequestData}
/>
{/* <Space style={{ width: "100%", marginTop: 10 }} direction="vertical">
<Space style={{ width: "100%", justifyContent: "flex-end" }} wrap>
<Button onClick={Previos} disabled={data?.previous ? false : true}>
<img src={leftPagination} />
<Space style={{ width: "100%", marginTop: 10 }} direction="vertical">
<Space
style={{
justifyContent: "end",
position: "fixed",
bottom: 0,
left: 0,
width: "100%",
backgroundColor: token.colorBgContainer,
boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
padding: "10px 0",
zIndex: 1000,
}}
wrap
>
<Button
onClick={Previos}
disabled={data?.previous ? false : true}
style={{
backgroundColor: token.colorBgContainer,
color: token.colorText,
border: "none",
}}
>
<LeftOutlined />
</Button>
<Input
style={{ width: 30, textAlign: "center" }}
style={{
width: 40,
textAlign: "center",
background: token.colorBgContainer,
border: "1px solid",
borderColor: token.colorText,
color: token.colorText,
}}
value={page}
onChange={(e) => {
let num = e.target.value;
@ -132,11 +169,19 @@ const Requests = ({ socketData }: { socketData: TSocket | undefined }) => {
}
}}
/>
<Button onClick={Next} disabled={data?.next ? false : true}>
<img src={rightPagination} />
<Button
onClick={Next}
disabled={data?.next ? false : true}
style={{
backgroundColor: token.colorBgContainer,
color: token.colorText,
border: "none",
}}
>
<RightOutlined />
</Button>
</Space>
</Space> */}
</Space>
</div>
);
};

@ -1,4 +1,4 @@
import { Button, Space, Table } from "antd";
import { Button, Space, Table, theme } from "antd";
import {
QueryObserverResult,
RefetchOptions,
@ -68,6 +68,9 @@ const RequestsTable = ({
refetch();
});
};
const { token } = theme.useToken();
return (
<div>
<Table
@ -161,7 +164,23 @@ const RequestsTable = ({
index % 2 === 0 ? "odd-row" : "even-row"
}
scroll={{ x: "768px" }}
pagination={{ pageSize: 10, size: "default" }}
// pagination={{
// pageSize: 10,
// size: "default",
// style: {
// margin: 0,
// justifyContent: "end",
// position: "fixed",
// bottom: 0,
// left: 0,
// width: "100%",
// backgroundColor: token.colorBgContainer,
// boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
// padding: "10px 0",
// zIndex: 1000,
// },
// }}
pagination={false}
bordered
/>
</div>

@ -9,6 +9,8 @@ import { TService } from "../../types/Service/TService";
// @ts-ignore
import tagIcon from "../../assets/tagIcon.png";
import { role } from "../../App";
import { theme } from "antd";
type numStr = string | number;
interface serviceSource {
@ -45,6 +47,9 @@ const ServiceTable = ({
dataIndex: "points",
},
];
const { token } = theme.useToken();
return (
<div>
<Table
@ -75,6 +80,18 @@ const ServiceTable = ({
pagination={{
pageSize: 10,
size: "default",
style: {
margin: 0,
justifyContent: "end",
position: "fixed",
bottom: 0,
left: 0,
width: "100%",
backgroundColor: token.colorBgContainer,
boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
padding: "10px 0",
zIndex: 1000,
},
}}
bordered
/>

@ -5,9 +5,20 @@ import ServiceTable from "./ServiceTable";
//@ts-ignore
import addicon from "../../assets/addiconpng.png";
import { role } from "../../App";
import { Typography } from "antd";
import { Pagination, Space, Typography } from "antd";
import { theme } from "antd";
const Service = () => {
const [page, setPage] = useState(1);
const { token } = theme.useToken();
const page_size = 10;
const handlePageChange = (page: number) => {
setPage(page);
};
const { data, isLoading, refetch } = useServiceData();
const [open, setOpen] = useState(false);
const showModal = () => {
@ -27,6 +38,48 @@ const Service = () => {
)}
</div>
<ServiceTable data={data} isLoading={isLoading} refetch={refetch} />
{/* <Space style={{ width: "100%", marginTop: 10 }} direction="vertical">
<Space
style={{
justifyContent: "end",
position: "fixed",
bottom: 0,
left: 0,
width: "100%",
backgroundColor: token.colorBgContainer,
boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
padding: "10px 0",
zIndex: 1000,
}}
wrap
>
<Button onClick={Previos} disabled={data?.previous ? false : true}>
</Button>
<Input
style={{ width: 30, textAlign: "center" }}
value={page}
onChange={(e) => {
let num = e.target.value;
if (Number(num) && num !== "0") {
setPage(Number(num));
}
}}
/>
<Button onClick={Next} disabled={data?.next ? false : true}>
</Button>
<Pagination
// current={page}
// total={10}
// pageSize={2}
// onChange={handlePageChange}
/>
</Space>
</Space> */}
</div>
);
};

@ -7,6 +7,9 @@ import {
} from "react-query";
// @ts-ignore
import tagIcon from "../../assets/tagIcon.png";
import { theme } from "antd";
const StatTable = ({
data,
isLoading,
@ -18,6 +21,8 @@ const StatTable = ({
data: { data: TStat[] | undefined };
isLoading: boolean;
}) => {
const { token } = theme.useToken();
return (
<div>
<Table
@ -53,6 +58,18 @@ const StatTable = ({
pagination={{
pageSize: 10,
size: "default",
style: {
margin: 0,
justifyContent: "end",
position: "fixed",
bottom: 0,
left: 0,
width: "100%",
backgroundColor: token.colorBgContainer,
boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
padding: "10px 0",
zIndex: 1000,
},
}}
rowClassName={(record, index) =>
index % 2 === 0 ? "odd-row" : "even-row"

@ -20,6 +20,8 @@ import tagIcon from "../../assets/tagIcon.png";
import tgIcon from "../../assets/telegram.png";
import { isMobile, role } from "../../App";
import { theme } from "antd";
const admin_id = localStorage.getItem("admin_id");
const TaskTable = ({
data,
@ -81,6 +83,8 @@ const TaskTable = ({
const [isTextSelected, setIsTextSelected] = useState(false);
const { token } = theme.useToken();
useEffect(() => {
const handleSelectionChange = () => {
const selection = window.getSelection();
@ -427,10 +431,23 @@ const TaskTable = ({
rowClassName={rowClassName}
scroll={{ x: "768px" }}
bordered
pagination={{
pageSize: 10,
size: "default",
}}
// pagination={{
// pageSize: 10,
// size: "default",
// style: {
// margin: 0,
// justifyContent: "end",
// position: "fixed",
// bottom: 0,
// left: 0,
// width: "100%",
// backgroundColor: token.colorBgContainer,
// boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
// padding: "10px 0",
// zIndex: 1000,
// },
// }}
pagination={false}
/>
</div>
);

@ -1,6 +1,6 @@
import { useEffect, useRef, useState } from "react";
import AddTask from "./AddTask";
import { Button, Input, Select, Space, Typography } from "antd";
import { Button, Input, Pagination, Select, Space, Typography } from "antd";
import TaskTable from "./TaskTable";
import { useTeamData } from "../../Hooks/Teams";
import { useTasks } from "../../Hooks/Tasks";
@ -17,6 +17,10 @@ import TaskUploadModal from "./TaskUploadModal";
import { TSocket } from "../../types/common/TSocket";
import ErrorUncompletedTasksModal from "./ErrorUncompletedTasksModal";
import { LeftOutlined, RightOutlined } from "@ant-design/icons";
import { theme } from "antd";
const { Option } = Select;
const Task = ({
socketData,
@ -38,6 +42,8 @@ const Task = ({
const [errorModal, setErrorModal] = useState(false);
const [uncomletedData, setUncomletedData] = useState<TTask[]>();
const [pageSize, setPageSize] = useState(10);
useEffect(() => {
if (
socketData &&
@ -123,13 +129,13 @@ const Task = ({
label: item?.name,
value: item?.id,
}));
const page_size = isMobile ? 10 : 15;
const page_size = 10;
const { data, isLoading, refetch } = useTasks({
search,
status,
team,
page,
page_size,
page_size: 10,
});
useEffect(() => {
if (data) {
@ -167,6 +173,11 @@ const Task = ({
}
};
const handlePageChange = (page: number, pageSize: number) => {
setPage(page);
setPageSize(pageSize);
};
const timerRef = useRef<NodeJS.Timeout | null>(null);
const handleSearchChange = (e: React.ChangeEvent<HTMLInputElement>) => {
if (timerRef.current) {
@ -178,7 +189,9 @@ const Task = ({
setSearch(searchText);
}, 1000);
};
const theme = localStorage.getItem("theme") === "true" ? true : false;
const themes = localStorage.getItem("theme") === "true" ? true : false;
const { token } = theme.useToken();
return (
<div>
@ -210,10 +223,6 @@ const Task = ({
)}
<div className="header d-flex">
<div className="header-title d-flex">
{/* <p className="title " style={{ color: theme ? "#fff" : "#000" }}>
Tasks
</p> */}
<Typography className="title">Tasks</Typography>
</div>
<div className="d-flex">
@ -229,6 +238,10 @@ const Task = ({
)}
<button
className={`btn-refresh-${false && "dark"} d-flex`}
style={{
backgroundColor: token.colorBgContainer,
color: token.colorText,
}}
onClick={() => {
refetch();
if (!isLive) {
@ -249,7 +262,7 @@ const Task = ({
<div className="search-div">
<img src={IconSearch} alt="" />
<input
className={`search-input-${theme}`}
className={`search-input-${themes}`}
type="text"
placeholder="Search"
onChange={handleSearchChange}
@ -287,14 +300,43 @@ const Task = ({
showErrorModal={showErrorModal}
setErrorModal={setErrorModal}
/>
{/* <Space style={{ width: "100%", marginTop: 10 }} direction="vertical">
<Space style={{ width: "100%", justifyContent: "flex-end" }} wrap>
<Button onClick={Previos} disabled={data?.previous ? false : true}>
<img src={leftPagination} />
<Space style={{ width: "100%", marginTop: 10 }} direction="vertical">
<Space
style={{
justifyContent: "end",
position: "fixed",
bottom: 0,
left: 0,
width: "100%",
backgroundColor: token.colorBgContainer,
boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
padding: "10px 0",
zIndex: 1000,
}}
wrap
>
<Button
onClick={Previos}
disabled={data?.previous ? false : true}
style={{
backgroundColor: token.colorBgContainer,
color: token.colorText,
border: "none",
}}
>
<LeftOutlined />
</Button>
<Input
style={{ width: 30, textAlign: "center" }}
disabled
style={{
width: 40,
textAlign: "center",
background: token.colorBgContainer,
border: "1px solid",
borderColor: token.colorText,
color: token.colorText,
}}
value={page}
onChange={(e) => {
let num = e.target.value;
@ -304,11 +346,25 @@ const Task = ({
}}
/>
<Button onClick={Next} disabled={data?.next ? false : true}>
<img src={rightPagination} />
<Button
onClick={Next}
disabled={data?.next ? false : true}
style={{
backgroundColor: token.colorBgContainer,
color: token.colorText,
border: "none",
}}
>
<RightOutlined />
</Button>
{/* <Pagination
current={page}
total={data?.data.length}
pageSize={pageSize}
onChange={handlePageChange}
/> */}
</Space>
</Space> */}
</Space>
</div>
);
};

@ -9,6 +9,9 @@ import {
import { timeZone } from "../../App";
// @ts-ignore
import tagIcon from "../../assets/tagIcon.png";
import { theme } from "antd";
const TeamTable = ({
data,
isLoading,
@ -23,6 +26,8 @@ const TeamTable = ({
const navigate = useNavigate();
const moment = require("moment-timezone");
const { token } = theme.useToken();
return (
<Table
loading={isLoading}
@ -56,7 +61,22 @@ const TeamTable = ({
dataIndex: "created",
},
]}
pagination={{ pageSize: 10, size: "default" }}
pagination={{
pageSize: 10,
size: "default",
style: {
margin: 0,
justifyContent: "end",
position: "fixed",
bottom: 0,
left: 0,
width: "100%",
backgroundColor: token.colorBgContainer,
boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
padding: "10px 0",
zIndex: 1000,
},
}}
bordered
/>
);

@ -1,6 +1,6 @@
import { useState } from "react";
import AddUpdate from "./AddUpdate";
import { Select, Typography } from "antd";
import { Select, Typography, theme } from "antd";
import UpdateTable from "./UpdateTable";
import { useUpdateData } from "../../Hooks/Update";
//@ts-ignore
@ -22,7 +22,9 @@ const Update = () => {
const showModal = () => {
setOpen(true);
};
const theme = localStorage.getItem("theme") === "true" ? true : false;
const { token } = theme.useToken();
return (
<div>
{open && <AddUpdate refetch={refetch} open={open} setOpen={setOpen} />}
@ -35,6 +37,10 @@ const Update = () => {
</button>
<button
className={`btn-refresh-${false && "dark"} d-flex`}
style={{
backgroundColor: token.colorBgContainer,
color: token.colorText,
}}
onClick={() => {
refetch();
}}

@ -1,4 +1,4 @@
import { Space, Table, Tooltip } from "antd";
import { Space, Table, Tooltip, theme } from "antd";
import moment from "moment";
import { useCompanyData } from "../../Hooks/Companies";
import { useCustomerData } from "../../Hooks/Customers";
@ -27,6 +27,7 @@ import zeelog from "../../assets/zeelogicon.svg";
import ontime from "../../assets/ontimeicon.svg";
// @ts-ignore
import tt from "../../assets/tticon.svg";
const UpdateTable = ({
data = [],
isLoading,
@ -82,6 +83,8 @@ const UpdateTable = ({
}
};
const { token } = theme.useToken();
return (
<div>
<Table
@ -293,7 +296,22 @@ const UpdateTable = ({
loading={isLoading}
size="small"
scroll={{ x: "768px" }}
pagination={{ pageSize: 10, size: "default" }}
pagination={{
pageSize: 10,
size: "default",
style: {
margin: 0,
justifyContent: "end",
position: "fixed",
bottom: 0,
left: 0,
width: "100%",
backgroundColor: token.colorBgContainer,
boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
padding: "10px 0",
zIndex: 1000,
},
}}
bordered
/>
</div>

@ -11,6 +11,9 @@ import { useNavigate } from "react-router-dom";
import tagIcon from "../../assets/tagIcon.png";
import { isMobile, role } from "../../App";
import { userController } from "../../API/LayoutApi/users";
import { theme } from "antd";
const UserTable = ({
data,
isLoading,
@ -33,6 +36,7 @@ const UserTable = ({
isTextSelected = false;
}
});
return {
onClick: () => {
if (isTextSelected) {
@ -43,6 +47,8 @@ const UserTable = ({
};
};
const { token } = theme.useToken();
return (
<div>
<Table
@ -100,7 +106,23 @@ const UserTable = ({
index % 2 === 0 ? "odd-row" : "even-row"
}
scroll={{ x: "768px" }}
pagination={{ pageSize: 10, size: "default" }}
pagination={{
pageSize: 50,
size: "default",
style: {
margin: 0,
justifyContent: "end",
position: "fixed",
bottom: 0,
left: 0,
width: "100%",
backgroundColor: token.colorBgContainer,
boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
padding: "10px 0",
zIndex: 1000,
},
showLessItems: true,
}}
bordered
/>
</div>

@ -6,7 +6,7 @@ import UserTable from "./UserTable";
import IconSearch from "../../assets/searchIcon.png";
//@ts-ignore
import addicon from "../../assets/addiconpng.png";
import { Typography } from "antd";
import { Pagination, Space, Typography } from "antd";
const User = () => {
const [open, setOpen] = useState(false);
@ -58,6 +58,48 @@ const User = () => {
</div>
</div>
<UserTable data={data} isLoading={isLoading} refetch={refetch} />
{/* <Space style={{ width: "100%", marginTop: 10 }} direction="vertical">
<Space
style={{
justifyContent: "end",
position: "fixed",
bottom: 0,
left: 0,
width: "100%",
// backgroundColor: token.colorBgContainer,
boxShadow: "0 4px 8px rgba(0, 0, 0, 0.4)",
padding: "10px 0",
zIndex: 1000,
}}
wrap
>
<Button onClick={Previos} disabled={data?.previous ? false : true}>
</Button>
<Input
style={{ width: 30, textAlign: "center" }}
value={page}
onChange={(e) => {
let num = e.target.value;
if (Number(num) && num !== "0") {
setPage(Number(num));
}
}}
/>
<Button onClick={Next} disabled={data?.next ? false : true}>
</Button>
<Pagination
// current={page}
// total={}
// pageSize={page_size}
// onChange={handlePageChange}
/>
</Space>
</Space> */}
</div>
);
};

@ -97,6 +97,13 @@ export const dark = {
colorPrimary: "rgba(249, 158, 44, 1)",
hoverBorderColor: "#BBBBBB",
},
Pagination: {
itemActiveBg: "#3a3a3a",
colorPrimary: "#bbb",
colorPrimaryHover: "rgba(249, 158, 44, 1)",
colorText: "#fff",
colorTextDisabled: "#fff",
},
Empty: {
colorText: "rgba(249, 158, 44, 1)",
colorTextDisabled: "rgba(249, 158, 44, 1)",
@ -106,6 +113,7 @@ export const dark = {
fontFamily: "Inter, sans-serif",
colorText: "#bbb",
borderRadius: 8,
colorBgContainer: "#3a3a3a",
},
};
export const light = {
@ -138,10 +146,16 @@ export const light = {
Menu: {
darkItemSelectedBg: "rgba(255, 255, 255, 0.08)",
},
Pagination: {
colorPrimary: "#262626",
colorPrimaryHover: "rgba(249, 158, 44, 1)",
colorBorder: "#000",
},
},
token: {
fontFamily: "Inter, sans-serif",
color: "#262626",
colorBgContainer: "#fff",
borderRadius: 8,
},
};

Loading…
Cancel
Save