From 7d3854dafa17b81946ed253cc9c4a6c8654ea8a0 Mon Sep 17 00:00:00 2001 From: dostonhack Date: Sat, 20 May 2023 10:26:18 +0500 Subject: [PATCH 01/22] Login page --- src/App.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/App.js b/src/App.js index 31c5bbdd1..eef76cffc 100644 --- a/src/App.js +++ b/src/App.js @@ -191,6 +191,7 @@ export default function App() { {layout === "vr" && } {getRoutes(routes)} + } /> } /> From 71ff9ad007c8fd07a39d928c952f39bdca08936b Mon Sep 17 00:00:00 2001 From: dostonhack Date: Sat, 20 May 2023 11:24:40 +0500 Subject: [PATCH 02/22] remove pattern --- .eslintrc.json | 7 +------ .prettierrc.json | 2 +- src/App.js | 15 --------------- src/examples/Sidenav/index.js | 24 ++++-------------------- src/routes.js | 32 +++++++++----------------------- 5 files changed, 15 insertions(+), 65 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index aef398db9..141344a27 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -13,12 +13,7 @@ }, "plugins": ["react", "prettier"], "rules": { - "prettier/prettier": [ - "error", - { - "endOfLine": "auto" - } - ], + "prettier/prettier": 0, "default-param-last": "off", "react/react-in-jsx-scope": "off", "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], diff --git a/.prettierrc.json b/.prettierrc.json index 40fa8e5f6..a73e1cee9 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -2,7 +2,7 @@ "printWidth": 100, "trailingComma": "es5", "tabWidth": 2, - "semi": true, + "semi": false, "singleQuote": false, "endOfLine": "auto" } diff --git a/src/App.js b/src/App.js index eef76cffc..894404d1a 100644 --- a/src/App.js +++ b/src/App.js @@ -1,18 +1,3 @@ -/** -========================================================= -* Material Dashboard 2 React - v2.1.0 -========================================================= - -* Product Page: https://www.creative-tim.com/product/material-dashboard-react -* Copyright 2022 Creative Tim (https://www.creative-tim.com) - -Coded by www.creative-tim.com - - ========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -*/ - import { useState, useEffect, useMemo } from "react"; // react-router components diff --git a/src/examples/Sidenav/index.js b/src/examples/Sidenav/index.js index f0d41d2b7..35b72ba02 100644 --- a/src/examples/Sidenav/index.js +++ b/src/examples/Sidenav/index.js @@ -1,18 +1,3 @@ -/** -========================================================= -* Material Dashboard 2 React - v2.1.0 -========================================================= - -* Product Page: https://www.creative-tim.com/product/material-dashboard-react -* Copyright 2022 Creative Tim (https://www.creative-tim.com) - -Coded by www.creative-tim.com - - ========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -*/ - import { useEffect } from "react"; // react-router-dom components @@ -30,7 +15,7 @@ import Icon from "@mui/material/Icon"; // Material Dashboard 2 React components import MDBox from "components/MDBox"; import MDTypography from "components/MDTypography"; -import MDButton from "components/MDButton"; +// import MDButton from "components/MDButton"; // Material Dashboard 2 React example components import SidenavCollapse from "examples/Sidenav/SidenavCollapse"; @@ -49,7 +34,7 @@ import { function Sidenav({ color, brand, brandName, routes, ...rest }) { const [controller, dispatch] = useMaterialUIController(); - const { miniSidenav, transparentSidenav, whiteSidenav, darkMode, sidenavColor } = controller; + const { miniSidenav, transparentSidenav, whiteSidenav, darkMode} = controller; const location = useLocation(); const collapseName = location.pathname.replace("/", ""); @@ -78,7 +63,6 @@ function Sidenav({ color, brand, brandName, routes, ...rest }) { // Call the handleMiniSidenav function to set the state with the initial value. handleMiniSidenav(); - // Remove event listener on cleanup return () => window.removeEventListener("resize", handleMiniSidenav); }, [dispatch, location]); @@ -179,7 +163,7 @@ function Sidenav({ color, brand, brandName, routes, ...rest }) { } /> {renderRoutes} - + {/* upgrade to pro - + */} ); } diff --git a/src/routes.js b/src/routes.js index 160f2fed7..fb14478d9 100644 --- a/src/routes.js +++ b/src/routes.js @@ -1,17 +1,3 @@ -/** -========================================================= -* Material Dashboard 2 React - v2.1.0 -========================================================= - -* Product Page: https://www.creative-tim.com/product/material-dashboard-react -* Copyright 2022 Creative Tim (https://www.creative-tim.com) - -Coded by www.creative-tim.com - - ========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -*/ /** All of the routes for the Material Dashboard 2 React are added here, @@ -39,7 +25,7 @@ Coded by www.creative-tim.com import Dashboard from "layouts/dashboard"; import Tables from "layouts/tables"; import Billing from "layouts/billing"; -import RTL from "layouts/rtl"; +// import RTL from "layouts/rtl"; import Notifications from "layouts/notifications"; import Profile from "layouts/profile"; import SignIn from "layouts/authentication/sign-in"; @@ -73,14 +59,14 @@ const routes = [ route: "/billing", component: , }, - { - type: "collapse", - name: "RTL", - key: "rtl", - icon: format_textdirection_r_to_l, - route: "/rtl", - component: , - }, + // { + // type: "collapse", + // name: "RTL", + // key: "rtl", + // icon: format_textdirection_r_to_l, + // route: "/rtl", + // component: , + // }, { type: "collapse", name: "Notifications", From 966dd2c24ed982fbe33e54dc013bf389e70331c1 Mon Sep 17 00:00:00 2001 From: Dilshods <100530577+Dilshods@users.noreply.github.com> Date: Sat, 20 May 2023 11:27:28 +0500 Subject: [PATCH 03/22] birinchi ish --- est | 1 + 1 file changed, 1 insertion(+) create mode 100644 est diff --git a/est b/est new file mode 100644 index 000000000..66f6f5f30 --- /dev/null +++ b/est @@ -0,0 +1 @@ +Token = "tokenType": "Bearer", \ No newline at end of file From e125d2612a4191744b8c2a6ef3689fbca98ae3f0 Mon Sep 17 00:00:00 2001 From: dostonhack Date: Sat, 20 May 2023 12:42:30 +0500 Subject: [PATCH 04/22] remove pattern --- src/examples/Breadcrumbs/index.js | 15 -- src/layouts/authentication/sign-in/index.js | 26 +- .../rtl/components/OrdersOverview/index.js | 84 ------- .../rtl/components/Projects/data/index.js | 230 ------------------ src/layouts/rtl/components/Projects/index.js | 102 -------- src/layouts/rtl/data/reportsBarChartData.js | 19 -- src/layouts/rtl/data/reportsLineChartData.js | 25 -- src/layouts/rtl/index.js | 176 -------------- 8 files changed, 7 insertions(+), 670 deletions(-) delete mode 100644 src/layouts/rtl/components/OrdersOverview/index.js delete mode 100644 src/layouts/rtl/components/Projects/data/index.js delete mode 100644 src/layouts/rtl/components/Projects/index.js delete mode 100644 src/layouts/rtl/data/reportsBarChartData.js delete mode 100644 src/layouts/rtl/data/reportsLineChartData.js delete mode 100644 src/layouts/rtl/index.js diff --git a/src/examples/Breadcrumbs/index.js b/src/examples/Breadcrumbs/index.js index 46d684da0..e078faf28 100644 --- a/src/examples/Breadcrumbs/index.js +++ b/src/examples/Breadcrumbs/index.js @@ -1,18 +1,3 @@ -/** -========================================================= -* Material Dashboard 2 React - v2.1.0 -========================================================= - -* Product Page: https://www.creative-tim.com/product/material-dashboard-react -* Copyright 2022 Creative Tim (https://www.creative-tim.com) - -Coded by www.creative-tim.com - - ========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -*/ - // react-router-dom components import { Link } from "react-router-dom"; diff --git a/src/layouts/authentication/sign-in/index.js b/src/layouts/authentication/sign-in/index.js index 6bdfb72ab..3d4d11d11 100644 --- a/src/layouts/authentication/sign-in/index.js +++ b/src/layouts/authentication/sign-in/index.js @@ -1,23 +1,8 @@ -/** -========================================================= -* Material Dashboard 2 React - v2.1.0 -========================================================= - -* Product Page: https://www.creative-tim.com/product/material-dashboard-react -* Copyright 2022 Creative Tim (https://www.creative-tim.com) - -Coded by www.creative-tim.com - - ========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -*/ import { useState } from "react"; // react-router-dom components -import { Link } from "react-router-dom"; - +import { Link,useNavigate} from "react-router-dom"; // @mui material components import Card from "@mui/material/Card"; import Switch from "@mui/material/Switch"; @@ -43,9 +28,12 @@ import bgImage from "assets/images/bg-sign-in-basic.jpeg"; function Basic() { const [rememberMe, setRememberMe] = useState(false); - + const history = useNavigate(); const handleSetRememberMe = () => setRememberMe(!rememberMe); - + const Login=()=>{ + console.log('asdcasd'); + history('/dashboard'); + } return ( @@ -101,7 +89,7 @@ function Basic() {   Remember me - + Login()}> sign in diff --git a/src/layouts/rtl/components/OrdersOverview/index.js b/src/layouts/rtl/components/OrdersOverview/index.js deleted file mode 100644 index ddeeef50c..000000000 --- a/src/layouts/rtl/components/OrdersOverview/index.js +++ /dev/null @@ -1,84 +0,0 @@ -/** -========================================================= -* Material Dashboard 2 React - v2.1.0 -========================================================= - -* Product Page: https://www.creative-tim.com/product/material-dashboard-react -* Copyright 2022 Creative Tim (https://www.creative-tim.com) - -Coded by www.creative-tim.com - - ========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -*/ - -// @mui material components -import Card from "@mui/material/Card"; -import Icon from "@mui/material/Icon"; - -// Material Dashboard 2 React components -import MDBox from "components/MDBox"; -import MDTypography from "components/MDTypography"; - -// Material Dashboard 2 React example components -import TimelineItem from "examples/Timeline/TimelineItem"; - -function OrdersOverview() { - return ( - - - - نظرة عامة على الطلبات - - - - - success.main }}>arrow_upward - -   - - 24% - {" "} - هذا الشهر - - - - - - - - - - - - ); -} - -export default OrdersOverview; diff --git a/src/layouts/rtl/components/Projects/data/index.js b/src/layouts/rtl/components/Projects/data/index.js deleted file mode 100644 index 3947a5184..000000000 --- a/src/layouts/rtl/components/Projects/data/index.js +++ /dev/null @@ -1,230 +0,0 @@ -/* eslint-disable react/prop-types */ -/* eslint-disable react/function-component-definition */ -/** -========================================================= -* Material Dashboard 2 React - v2.1.0 -========================================================= - -* Product Page: https://www.creative-tim.com/product/material-dashboard-react -* Copyright 2022 Creative Tim (https://www.creative-tim.com) - -Coded by www.creative-tim.com - - ========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -*/ - -// @mui material components -import Tooltip from "@mui/material/Tooltip"; - -// Material Dashboard 2 React components -import MDBox from "components/MDBox"; -import MDTypography from "components/MDTypography"; -import MDAvatar from "components/MDAvatar"; -import MDProgress from "components/MDProgress"; - -// Images -import logoXD from "assets/images/small-logos/logo-xd.svg"; -import logoAtlassian from "assets/images/small-logos/logo-atlassian.svg"; -import logoSlack from "assets/images/small-logos/logo-slack.svg"; -import logoSpotify from "assets/images/small-logos/logo-spotify.svg"; -import logoJira from "assets/images/small-logos/logo-jira.svg"; -import logoInvesion from "assets/images/small-logos/logo-invision.svg"; -import team1 from "assets/images/team-1.jpg"; -import team2 from "assets/images/team-2.jpg"; -import team3 from "assets/images/team-3.jpg"; -import team4 from "assets/images/team-4.jpg"; - -export default function data() { - const avatars = (أعضاء) => - أعضاء.map(([image, name]) => ( - - - `${borderWidth[2]} solid ${white.main}`, - cursor: "pointer", - position: "relative", - - "&:not(:first-of-type)": { - ml: -1.25, - }, - - "&:hover, &:focus": { - zIndex: "10", - }, - }} - /> - - )); - - const Company = ({ image, name }) => ( - - - - {name} - - - ); - - return { - columns: [ - { Header: "المشروع", accessor: "المشروع", width: "45%", align: "left" }, - { Header: "أعضاء", accessor: "أعضاء", width: "10%", align: "left" }, - { Header: "ميزانية", accessor: "ميزانية", align: "center" }, - { Header: "إكمال", accessor: "إكمال", align: "center" }, - ], - - rows: [ - { - المشروع: ( - - ), - أعضاء: ( - - {avatars([ - [team1, "Ryan Tompson"], - [team2, "Romina Hadid"], - [team3, "Alexander Smith"], - [team4, "Jessica Doe"], - ])} - - ), - ميزانية: ( - - $14,000 - - ), - إكمال: ( - - - - ), - }, - { - المشروع: , - أعضاء: ( - - {avatars([ - [team2, "Romina Hadid"], - [team4, "Jessica Doe"], - ])} - - ), - ميزانية: ( - - $3,000 - - ), - إكمال: ( - - - - ), - }, - { - المشروع: , - أعضاء: ( - - {avatars([ - [team1, "Ryan Tompson"], - [team3, "Alexander Smith"], - ])} - - ), - ميزانية: ( - - غير مضبوط - - ), - إكمال: ( - - - - ), - }, - { - المشروع: , - أعضاء: ( - - {avatars([ - [team4, "Jessica Doe"], - [team3, "Alexander Smith"], - [team2, "Romina Hadid"], - [team1, "Ryan Tompson"], - ])} - - ), - ميزانية: ( - - $20,500 - - ), - إكمال: ( - - - - ), - }, - { - المشروع: , - أعضاء: ( - - {avatars([[team4, "Jessica Doe"]])} - - ), - ميزانية: ( - - $500 - - ), - إكمال: ( - - - - ), - }, - { - المشروع: , - أعضاء: ( - - {avatars([ - [team1, "Ryan Tompson"], - [team4, "Jessica Doe"], - ])} - - ), - ميزانية: ( - - $2,000 - - ), - إكمال: ( - - - - ), - }, - ], - }; -} diff --git a/src/layouts/rtl/components/Projects/index.js b/src/layouts/rtl/components/Projects/index.js deleted file mode 100644 index f73c3b88a..000000000 --- a/src/layouts/rtl/components/Projects/index.js +++ /dev/null @@ -1,102 +0,0 @@ -/** -========================================================= -* Material Dashboard 2 React - v2.1.0 -========================================================= - -* Product Page: https://www.creative-tim.com/product/material-dashboard-react -* Copyright 2022 Creative Tim (https://www.creative-tim.com) - -Coded by www.creative-tim.com - - ========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -*/ - -import { useState } from "react"; - -// @mui material components -import Card from "@mui/material/Card"; -import Icon from "@mui/material/Icon"; -import Menu from "@mui/material/Menu"; -import MenuItem from "@mui/material/MenuItem"; - -// Material Dashboard 2 React components -import MDBox from "components/MDBox"; -import MDTypography from "components/MDTypography"; -import DataTable from "examples/Tables/DataTable"; - -// Data -import data from "layouts/rtl/components/Projects/data"; - -function Projects() { - const { columns, rows } = data(); - const [menu, setMenu] = useState(null); - - const openMenu = ({ currentTarget }) => setMenu(currentTarget); - const closeMenu = () => setMenu(null); - - const renderMenu = ( - - عمل - عمل آخر - شيء آخر هنا - - ); - - return ( - - - - - المشاريع - - - info.main, - mt: -0.5, - }} - > - done - - -  30 انتهى هذا الشهر - - - - - - more_vert - - - {renderMenu} - - - - - - ); -} - -export default Projects; diff --git a/src/layouts/rtl/data/reportsBarChartData.js b/src/layouts/rtl/data/reportsBarChartData.js deleted file mode 100644 index ecd7cff37..000000000 --- a/src/layouts/rtl/data/reportsBarChartData.js +++ /dev/null @@ -1,19 +0,0 @@ -/** -========================================================= -* Material Dashboard 2 React - v2.1.0 -========================================================= - -* Product Page: https://www.creative-tim.com/product/material-dashboard-react -* Copyright 2022 Creative Tim (https://www.creative-tim.com) - -Coded by www.creative-tim.com - - ========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -*/ - -export default { - labels: ["M", "T", "W", "T", "F", "S", "S"], - datasets: { label: "Sales", data: [50, 20, 10, 22, 50, 10, 40] }, -}; diff --git a/src/layouts/rtl/data/reportsLineChartData.js b/src/layouts/rtl/data/reportsLineChartData.js deleted file mode 100644 index 12d0e058b..000000000 --- a/src/layouts/rtl/data/reportsLineChartData.js +++ /dev/null @@ -1,25 +0,0 @@ -/** -========================================================= -* Material Dashboard 2 React - v2.1.0 -========================================================= - -* Product Page: https://www.creative-tim.com/product/material-dashboard-react -* Copyright 2022 Creative Tim (https://www.creative-tim.com) - -Coded by www.creative-tim.com - - ========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -*/ - -export default { - sales: { - labels: ["Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - datasets: { label: "Mobile apps", data: [50, 40, 300, 320, 500, 350, 200, 230, 500] }, - }, - tasks: { - labels: ["Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - datasets: { label: "Desktop apps", data: [50, 40, 300, 220, 500, 250, 400, 230, 500] }, - }, -}; diff --git a/src/layouts/rtl/index.js b/src/layouts/rtl/index.js deleted file mode 100644 index 67b9216d1..000000000 --- a/src/layouts/rtl/index.js +++ /dev/null @@ -1,176 +0,0 @@ -/** -========================================================= -* Material Dashboard 2 React - v2.1.0 -========================================================= - -* Product Page: https://www.creative-tim.com/product/material-dashboard-react -* Copyright 2022 Creative Tim (https://www.creative-tim.com) - -Coded by www.creative-tim.com - - ========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -*/ - -import { useEffect } from "react"; - -// @mui material components -import Grid from "@mui/material/Grid"; - -// Material Dashboard 2 React components -import MDBox from "components/MDBox"; - -// Material Dashboard 2 React example components -import DashboardLayout from "examples/LayoutContainers/DashboardLayout"; -import DashboardNavbar from "examples/Navbars/DashboardNavbar"; -import Footer from "examples/Footer"; -import ReportsBarChart from "examples/Charts/BarCharts/ReportsBarChart"; -import ReportsLineChart from "examples/Charts/LineCharts/ReportsLineChart"; -import ComplexStatisticsCard from "examples/Cards/StatisticsCards/ComplexStatisticsCard"; - -// Data -import reportsBarChartData from "layouts/rtl/data/reportsBarChartData"; -import reportsLineChartData from "layouts/rtl/data/reportsLineChartData"; - -// RTL components -import Projects from "layouts/rtl/components/Projects"; -import OrdersOverview from "layouts/rtl/components/OrdersOverview"; - -// Material Dashboard 2 React contexts -import { useMaterialUIController, setDirection } from "context"; - -function RTL() { - const [, dispatch] = useMaterialUIController(); - const { sales, tasks } = reportsLineChartData; - - // Changing the direction to rtl - useEffect(() => { - setDirection(dispatch, "rtl"); - - return () => setDirection(dispatch, "ltr"); - }, []); - - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (+15%) زيادة في مبيعات اليوم.. - - } - date="تم التحديث منذ 4 دقائق" - chart={sales} - /> - - - - - - - - - - - - - - - - - - - - -