update design

dilmurod
Dilmurod 2 months ago
parent c3b922a083
commit 3d09dd1897

@ -104,7 +104,7 @@
.profile-dropdown:hover { .profile-dropdown:hover {
border-radius: 8px; border-radius: 8px;
background: #7c7c7c; cursor: pointer;
} }
.profile-dropdown-ava { .profile-dropdown-ava {
@ -865,6 +865,10 @@
border-radius: 8px; border-radius: 8px;
} */ } */
.ant-pagination-item {
width: 40px;
}
.btn-refresh-dark img { .btn-refresh-dark img {
animation: none; animation: none;
transition: transform 0.2s linear; transition: transform 0.2s linear;

@ -481,7 +481,7 @@ const App: React.FC = () => {
> >
<img src={themeBtn} alt="" /> <img src={themeBtn} alt="" />
</button> </button>
<Dropdown overlay={menu} trigger={["click"]}> <Dropdown overlay={menu} trigger={["hover"]}>
<div <div
style={{ cursor: "pointer" }} style={{ cursor: "pointer" }}
onClick={(e) => e.preventDefault()} onClick={(e) => e.preventDefault()}

@ -11,6 +11,8 @@ import {
} from "antd"; } from "antd";
import { TCall } from "../../types/CallRequests/TCall"; import { TCall } from "../../types/CallRequests/TCall";
import { TSocket } from "../../types/common/TSocket"; import { TSocket } from "../../types/common/TSocket";
import { LeftOutlined, RightOutlined } from "@ant-design/icons";
import { theme } from "antd";
const Call = ({ socketData }: { socketData: TSocket | undefined }) => { const Call = ({ socketData }: { socketData: TSocket | undefined }) => {
const [status, setStatus] = useState("Awaiting"); const [status, setStatus] = useState("Awaiting");
@ -19,10 +21,11 @@ const Call = ({ socketData }: { socketData: TSocket | undefined }) => {
const { data, isLoading, refetch } = useCallData({ const { data, isLoading, refetch } = useCallData({
status: status, status: status,
page: page, page: page,
page_size: 10, page_size: 15,
}); });
const theme = localStorage.getItem("theme") === "true" ? true : false; // const theme = localStorage.getItem("theme") === "true" ? true : false;
const { token } = theme.useToken();
useEffect(() => { useEffect(() => {
setTableData(data?.data); setTableData(data?.data);
@ -98,13 +101,42 @@ const Call = ({ socketData }: { socketData: TSocket | undefined }) => {
</div> </div>
<CallTable data={tableData} isLoading={isLoading} refetch={refetch} /> <CallTable data={tableData} isLoading={isLoading} refetch={refetch} />
{/* <Space style={{ width: "100%", marginTop: 10 }} direction="vertical"> <Space style={{ width: "100%", marginTop: 10 }} direction="vertical">
<Space style={{ width: "100%", justifyContent: "flex-end" }} wrap> <Space
<Button onClick={Previos} disabled={data?.previous ? false : true}> style={{
<img src={leftPagination} /> 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> </Button>
<Input <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} value={page}
onChange={(e) => { onChange={(e) => {
let num = e.target.value; let num = e.target.value;
@ -113,11 +145,19 @@ const Call = ({ socketData }: { socketData: TSocket | undefined }) => {
} }
}} }}
/> />
<Button onClick={Next} disabled={data?.next ? false : true}> <Button
<img src={rightPagination} /> onClick={Next}
disabled={data?.next ? false : true}
style={{
backgroundColor: token.colorBgContainer,
color: token.colorText,
border: "none",
}}
>
<RightOutlined />
</Button> </Button>
</Space> </Space>
</Space> */} </Space>
</div> </div>
); );
}; };

@ -30,7 +30,7 @@ const Company = () => {
name: search, name: search,
is_active: undefined, is_active: undefined,
page: page, page: page,
page_size: 10, page_size: 15,
}); });
const timerRef = useRef<NodeJS.Timeout | null>(null); const timerRef = useRef<NodeJS.Timeout | null>(null);

@ -19,19 +19,13 @@ const Customer = () => {
setOpen(true); setOpen(true);
}; };
const page_size = 10;
const handlePageChange = (page: number) => {
setPage(page);
};
const { token } = theme.useToken(); const { token } = theme.useToken();
const [search, setSearch] = useState(""); const [search, setSearch] = useState("");
const { data, isLoading, refetch } = useCustomerData({ const { data, isLoading, refetch } = useCustomerData({
name: search, name: search,
is_active: undefined, is_active: undefined,
page_size: 10, page_size: 15,
page: page, page: page,
}); });
@ -142,9 +136,9 @@ const Customer = () => {
{/* <Pagination {/* <Pagination
current={page} current={page}
total={10} total={100}
pageSize={page_size} pageSize={data?.page_size}
onChange={handlePageChange} onChange={(page) => setPage(page)}
/> */} /> */}
</Space> </Space>
</Space> </Space>

@ -1,4 +1,5 @@
import { useState } from "react"; import { useState } from "react";
import dayjs from "dayjs";
import { import {
LineChart, LineChart,
@ -88,6 +89,12 @@ const Profile = () => {
tasks: stat.number_of_tasks, tasks: stat.number_of_tasks,
})); }));
const firstDayOfMonth = dayjs().startOf("month"); // Oyning birinchi kuni
// const lastDayOfMonth = dayjs().endOf("month");
const today = dayjs();
const dateFormat = "YYYY-MM-DD";
return ( return (
<div> <div>
<Spin size="large" spinning={!data}> <Spin size="large" spinning={!data}>
@ -165,6 +172,9 @@ const Profile = () => {
<Row gutter={[16, 10]}> <Row gutter={[16, 10]}>
{data && data.team !== "" && ( {data && data.team !== "" && (
<Col> <Col>
{role === "Owner" || role === "Tech Support" ? (
""
) : (
<Form.Item <Form.Item
wrapperCol={{ span: "100%" }} wrapperCol={{ span: "100%" }}
label="Team" label="Team"
@ -172,6 +182,7 @@ const Profile = () => {
> >
<Input readOnly /> <Input readOnly />
</Form.Item> </Form.Item>
)}
</Col> </Col>
)} )}
</Row> </Row>
@ -185,7 +196,13 @@ const Profile = () => {
justifyContent: "flex-start", justifyContent: "flex-start",
}} }}
> >
<RangePicker onCalendarChange={datePick} /> <RangePicker
onCalendarChange={datePick}
defaultValue={[
dayjs(firstDayOfMonth, dateFormat),
dayjs(today, dateFormat),
]}
/>
</div> </div>
<div <div

@ -62,7 +62,7 @@ const TeamTable = ({
}, },
]} ]}
pagination={{ pagination={{
pageSize: 10, pageSize: 15,
size: "default", size: "default",
style: { style: {
margin: 0, margin: 0,

@ -297,7 +297,7 @@ const UpdateTable = ({
size="small" size="small"
scroll={{ x: "768px" }} scroll={{ x: "768px" }}
pagination={{ pagination={{
pageSize: 10, pageSize: 15,
size: "default", size: "default",
style: { style: {
margin: 0, margin: 0,

@ -107,7 +107,7 @@ const UserTable = ({
} }
scroll={{ x: "768px" }} scroll={{ x: "768px" }}
pagination={{ pagination={{
pageSize: 50, pageSize: 15,
size: "default", size: "default",
style: { style: {
margin: 0, margin: 0,

Loading…
Cancel
Save