- المشاريع
+ Projects
- 30 انتهى هذا الشهر
+ 30 done this month
diff --git a/src/layouts/rtl/data/reportsBarChartData.js b/src/layouts/dashboard copy/data/reportsBarChartData.js
similarity index 100%
rename from src/layouts/rtl/data/reportsBarChartData.js
rename to src/layouts/dashboard copy/data/reportsBarChartData.js
diff --git a/src/layouts/rtl/data/reportsLineChartData.js b/src/layouts/dashboard copy/data/reportsLineChartData.js
similarity index 100%
rename from src/layouts/rtl/data/reportsLineChartData.js
rename to src/layouts/dashboard copy/data/reportsLineChartData.js
diff --git a/src/layouts/dashboard copy/index.js b/src/layouts/dashboard copy/index.js
new file mode 100644
index 000000000..8508f2ab2
--- /dev/null
+++ b/src/layouts/dashboard copy/index.js
@@ -0,0 +1,269 @@
+import Card from "@mui/material/Card"
+import Grid from "@mui/material/Grid"
+import DashboardLayout from "examples/LayoutContainers/DashboardLayout"
+
+// @mui material components
+
+// Material Dashboard 2 React components
+import MDBox from "components/MDBox"
+import MDTypography from "components/MDTypography"
+import MDSnackbar from "components/MDSnackbar"
+// Material Dashboard 2 React example components
+import Tooltip from "@mui/material/Tooltip"
+import DashboardNavbar from "examples/Navbars/DashboardNavbar"
+import DataTable from "examples/Tables/DataTable"
+import { useEffect, useState } from "react"
+
+import AddModal from "./modals/addModal"
+import DeleteModal from "./modals/deleteModal"
+import EditModal from "./modals/editModal"
+
+function Categoreis() {
+ const [categories, setCategories] = useState([])
+ const [categoriesRef, setCategoriesRef] = useState(false)
+ // Succes Notification
+ const [successSB, setSuccessSB] = useState({ open: false, message: "" })
+ const openSuccessSB = (mes) => setSuccessSB({ open: true, message: mes })
+ const closeSuccessSB = () => setSuccessSB({ open: false })
+ // Error Notification
+ const [errorSB, setErrorSB] = useState({ open: false, message: "" })
+ const openErrorSB = (errorMes) => setErrorSB({ open: true, message: errorMes })
+ const closeErrorSB = () => setErrorSB({ open: false })
+
+ // Categories information api
+ useEffect(() => {
+ const requestOptions = {
+ method: "GET",
+ headers: { "Content-Type": "application/json" },
+ }
+ fetch("http://165.232.85.45:1988/koinot/category", requestOptions)
+ .then((response) => response.json())
+ .then((data) => setCategories(data.objectKoinot))
+ }, [categoriesRef])
+
+ // Delete Category
+ const deleteCategory = (id) => {
+ const Token = localStorage.getItem("Token")
+ const myHeaders = new Headers()
+ myHeaders.append("Content-Type", "application/json")
+ myHeaders.append("Authorization", `Bearer ${Token}`)
+ const requestOptions = {
+ method: "DELETE",
+ headers: myHeaders,
+ redirect: "follow",
+ }
+
+ fetch(`http://165.232.85.45:1988/koinot/category/${id}`, requestOptions)
+ .then((response) => response.text())
+ .then((result) => {
+ const res = JSON.parse(result)
+ console.log(typeof res.message, res.success)
+ if (res.success === 200) {
+ openSuccessSB("Category deleted successfully")
+ setCategoriesRef(!categoriesRef)
+ }
+ })
+ .catch((error) => {
+ console.log(error)
+ openErrorSB(`Category not deleted ${error}`)
+ })
+ }
+ // Edit Category
+ const editCategory = (edit) => {
+ console.log(edit)
+ const myHeaders = new Headers()
+ myHeaders.append("Content-Type", "application/json")
+
+ const raw = JSON.stringify({
+ id: edit.id,
+ textEn: edit.textEn,
+ textRu: edit.textRu,
+ textUz: edit.textUz,
+ textUzK: edit.textUzK,
+ })
+
+ const requestOptions = {
+ method: "POST",
+ headers: myHeaders,
+ body: raw,
+ redirect: "follow",
+ }
+
+ fetch("http://165.232.85.45:1988/koinot/category", requestOptions)
+ .then((response) => response.json())
+ .then((res) => {
+ console.log(typeof res.message, res.success)
+ if (res.success === 200) {
+ openSuccessSB("Category edit successfully")
+ setCategoriesRef(!categoriesRef)
+ }
+ })
+ .catch((error) => {
+ console.log(error)
+ openErrorSB(`Category not Edit ${error}`)
+ })
+ }
+
+ // Add Category
+ const addCategory = (add) => {
+ console.log(add)
+ const myHeaders = new Headers()
+ const token = localStorage.getItem("Token")
+ myHeaders.append("Content-Type", "application/json")
+ myHeaders.append("Authorization", `Bearer access_${token}`)
+
+ const raw = JSON.stringify({
+ textEn: add.addEng,
+ textRu: add.addRus,
+ textUz: add.addUzb,
+ textUzK: add.addUzbK,
+ })
+
+ const requestOptions = {
+ method: "POST",
+ headers: myHeaders,
+ body: raw,
+ redirect: "follow",
+ }
+
+ fetch("http://165.232.85.45:1988/koinot/category", requestOptions)
+ .then((response) => response.text())
+ .then((result) => {
+ const res = JSON.parse(result)
+ console.log(typeof res.message, res.success)
+ if (res.success === 200) {
+ openSuccessSB("Category added successfully")
+ setCategoriesRef(!categoriesRef)
+ }
+ })
+ .catch((error) => {
+ console.log(error)
+ openErrorSB(`Category not added ${error}`)
+ })
+ }
+
+ // Notifications
+ const renderSuccessSB = (
+
+ )
+ const renderErrorSB = (
+
+ )
+
+ // Columns port
+ const columns = [
+ { Header: "Uzb", accessor: "uzbek", width: "20%", align: "left" },
+ { Header: "UzK", accessor: "kiril", width: "20%", align: "left" },
+ { Header: "Rus", accessor: "ruscha", width: "20%", align: "left" },
+ { Header: "Eng", accessor: "english", width: "20%", align: "left" },
+ { Header: "Edit", accessor: "edit", width: "20%", align: "right" },
+ { Header: "Delete", accessor: "delete", width: "20%", align: "right" },
+ ]
+
+ // Rows categories
+ const rows = categories.map((item) => ({
+ uzbek: (
+
+ {item.textUz}
+
+ ),
+ kiril: (
+
+ {item.textUzK}
+
+ ),
+ ruscha: (
+
+ {item.textRu}
+
+ ),
+ english: (
+
+ {item.textEn}
+
+ ),
+ edit: (
+
+ editCategory(e)}
+ />
+
+ ),
+ delete: (
+
+
+ deleteCategory(e)} />
+
+
+ ),
+ }))
+
+ return (
+
+ Category
+
+
+
+
+
+
+
+ Category Table
+
+ addCategory(e)} />
+
+
+
+
+
+
+
+
+ {renderSuccessSB}
+ {renderErrorSB}
+
+ )
+}
+
+export default Categoreis
diff --git a/src/layouts/dashboard copy/modals/addModal/index.js b/src/layouts/dashboard copy/modals/addModal/index.js
new file mode 100644
index 000000000..859cde32a
--- /dev/null
+++ b/src/layouts/dashboard copy/modals/addModal/index.js
@@ -0,0 +1,83 @@
+import * as React from "react"
+import Box from "@mui/material/Box"
+import MDButton from "components/MDButton"
+import Typography from "@mui/material/Typography"
+import Modal from "@mui/material/Modal"
+import Icon from "@mui/material/Icon"
+import MDInput from "components/MDInput"
+
+export default function AddModal({ saveBtn, title, tagtitle }) {
+ const style = {
+ position: "absolute",
+ top: "50%",
+ left: "50%",
+ transform: "translate(-50%, -50%)",
+ width: 400,
+ bgcolor: "background.paper",
+ border: "2px solid #000",
+ boxShadow: 24,
+ p: 4,
+ display: "flex",
+ flexDirection: "column",
+ height: "390px",
+ justifyContent: "space-between",
+ }
+
+ const [open, setOpen] = React.useState(false)
+ const [textUzb, setTextUzb] = React.useState("")
+ const [textUzbK, setTextUzbK] = React.useState("")
+ const [textRus, setTextRus] = React.useState("")
+ const [textEng, setTextEng] = React.useState("")
+ const handleOpen = () => setOpen(true)
+ const handleClose = () => {
+ setOpen(false)
+ setTextUzb("")
+ setTextUzbK("")
+ setTextRus("")
+ setTextEng("")
+ }
+ const handleAdd = () => {
+ saveBtn({
+ addUzb: textUzb,
+ addUzbK: textUzbK,
+ addRus: textRus,
+ addEng: textEng,
+ })
+ setOpen(false)
+ setTextUzb("")
+ setTextUzbK("")
+ setTextRus("")
+ setTextEng("")
+ }
+ return (
+
+
+ add
+ {title}
+ {tagtitle}
+
+
+
+
+ Kategorya qushish
+
+ setTextUzb(e.target.value)} />
+ setTextUzbK(e.target.value)} />
+ setTextRus(e.target.value)} />
+ setTextEng(e.target.value)} />
+
+ Save
+
+
+ Close
+
+
+
+
+ )
+}
diff --git a/src/layouts/dashboard copy/modals/deleteModal/index.js b/src/layouts/dashboard copy/modals/deleteModal/index.js
new file mode 100644
index 000000000..87793082a
--- /dev/null
+++ b/src/layouts/dashboard copy/modals/deleteModal/index.js
@@ -0,0 +1,61 @@
+import DeleteIcon from "@mui/icons-material/Delete"
+import { Tooltip } from "@mui/material"
+import Box from "@mui/material/Box"
+import Modal from "@mui/material/Modal"
+import Typography from "@mui/material/Typography"
+import MDButton from "components/MDButton"
+import { useState } from "react"
+
+export default function DeleteModal({ deleteBtn, itemData }) {
+ const style = {
+ position: "absolute",
+ top: "50%",
+ left: "50%",
+ transform: "translate(-50%, -50%)",
+ width: 400,
+ bgcolor: "background.paper",
+ border: "2px solid #000",
+ boxShadow: 24,
+ p: 4,
+ display: "flex",
+ flexDirection: "column",
+ height: "200px",
+ justifyContent: "space-between",
+ }
+
+ const [open, setOpen] = useState(false)
+ const handleOpen = () => setOpen(true)
+ const handleClose = () => setOpen(false)
+ const handleDelete = (value) => {
+ deleteBtn(value)
+ setOpen(false)
+ }
+
+ return (
+
+
+
+
+
+
+
+
+
+ Kategorya ochirmoqchimisiz?
+
+ handleDelete(itemData.id)} variant="gradient" color="dark">
+ Xa
+
+
+ Yuq
+
+
+
+
+ )
+}
diff --git a/src/layouts/dashboard copy/modals/editModal/index.js b/src/layouts/dashboard copy/modals/editModal/index.js
new file mode 100644
index 000000000..624d12ab2
--- /dev/null
+++ b/src/layouts/dashboard copy/modals/editModal/index.js
@@ -0,0 +1,87 @@
+import Box from "@mui/material/Box"
+import Modal from "@mui/material/Modal"
+import Typography from "@mui/material/Typography"
+import MDButton from "components/MDButton"
+import MDInput from "components/MDInput"
+import Tooltip from "@mui/material/Tooltip"
+import * as React from "react"
+import { EditRounded } from "@mui/icons-material"
+
+export default function EditModal({id, nameUzb, nameUzbK, nameRus, nameEng, saveAllName }) {
+ const style = {
+ position: "absolute",
+ top: "50%",
+ left: "50%",
+ transform: "translate(-50%, -50%)",
+ width: 400,
+ bgcolor: "background.paper",
+ border: "2px solid #000",
+ boxShadow: 24,
+ p: 4,
+ display: "flex",
+ flexDirection: "column",
+ height: "390px",
+ justifyContent: "space-between",
+ }
+ const [open, setOpen] = React.useState(false)
+ const [textUz, setTextUzb] = React.useState(nameUzb)
+ const [textUzK, setTextUzbK] = React.useState(nameUzbK)
+ const [textRu, setTextRus] = React.useState(nameRus)
+ const [textEn, setTextEng] = React.useState(nameEng)
+ const handleOpen = () => setOpen(true)
+ const handleClose = () => setOpen(false)
+ const handleSave = () => {
+ saveAllName({id, textUz, textUzK, textRu, textEn })
+ setOpen(false)
+ }
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ Kategorya uzgartirish
+
+ setTextUzb(e.target.value)}
+ />
+ setTextUzbK(e.target.value)}
+ />
+ setTextEng(e.target.value)}
+ />
+ setTextRus(e.target.value)}
+ />
+ handleSave()} variant="gradient" color="dark">
+ Save
+
+
+ Close
+
+
+
+
+ )
+}
diff --git a/src/layouts/feedback controller/feedmodal/feedlook/index.js b/src/layouts/feedback controller/feedmodal/feedlook/index.js
new file mode 100644
index 000000000..34688a26f
--- /dev/null
+++ b/src/layouts/feedback controller/feedmodal/feedlook/index.js
@@ -0,0 +1,82 @@
+import Box from "@mui/material/Box"
+import Modal from "@mui/material/Modal"
+import Typography from "@mui/material/Typography"
+import MDBox from "components/MDBox"
+import MDInput from "components/MDInput"
+import * as React from "react"
+import { FormControl, IconButton } from "@mui/material"
+import { Visibility, VisibilityOff } from "@mui/icons-material"
+
+export default function FeedlookModal({ name, email, phoneNumber, title }) {
+ const style = {
+ position: "absolute",
+ top: "50%",
+ left: "55%",
+ transform: "translate(-50%, -50%)",
+ width: "70%",
+ bgcolor: "background.paper",
+ border: "2px solid #000",
+ boxShadow: 24,
+ p: 4,
+ display: "flex",
+ flexDirection: "column",
+ height: "auto",
+ justifyContent: "space-between",
+ borderRadius: "10px",
+ }
+
+ const [checked, setChecked] = React.useState(false)
+ const handleClose = () => setChecked(false)
+
+ const handleClickShowPassword = () => {
+ setChecked((prev) => !prev)
+ }
+
+ const handleMouseDownPassword = () => {}
+
+ return (
+
+
+
+ {setChecked ? : }
+
+
+
+
+
+ Xabarni kuring
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fikir:
+
+
+ {title}
+
+
+
+
+
+ )
+}
diff --git a/src/layouts/feedback controller/index.js b/src/layouts/feedback controller/index.js
new file mode 100644
index 000000000..471394b87
--- /dev/null
+++ b/src/layouts/feedback controller/index.js
@@ -0,0 +1,172 @@
+// @mui material components
+import Grid from "@mui/material/Grid"
+import Card from "@mui/material/Card"
+
+// Material Dashboard 2 React components
+import MDBox from "components/MDBox"
+import MDTypography from "components/MDTypography"
+import MDButton from "components/MDButton"
+
+// Material Dashboard 2 React example components
+import DashboardLayout from "examples/LayoutContainers/DashboardLayout"
+import DashboardNavbar from "examples/Navbars/DashboardNavbar"
+import Footer from "examples/Footer"
+import DataTable from "examples/Tables/DataTable"
+// Dat
+import { AddTask } from "@mui/icons-material"
+import { IconButton } from "@mui/material"
+import { useEffect, useState } from "react"
+import MDInput from "components/MDInput"
+import FeedlookModal from "./feedmodal/feedlook"
+
+function FeedbackController() {
+ const [openfeed, setOpenFeed] = useState([])
+ const [swichFeedBack, setSwichFeedBack] = useState(false)
+ const [refrFeedBack, setRefrFeedBack] = useState(false)
+
+ useEffect(() => {
+ const requestOptions = {
+ method: "GET",
+ redirect: "follow",
+ }
+
+ fetch(`http://165.232.85.45:1988/koinot/feedback?active=${swichFeedBack}`, requestOptions)
+ .then((response) => response.json())
+ .then((result) => setOpenFeed(result.object.content))
+ .catch((error) => console.log("error", error))
+ }, [swichFeedBack,refrFeedBack])
+
+ const handleSaveFeedback = (id) => {
+ console.log(id, "id")
+ const requestOptions = {
+ method: "PUT",
+ redirect: "follow",
+ }
+
+ fetch(
+ `http://165.232.85.45:1988/koinot/feedback/changeActive/${id}?active=${!swichFeedBack}`,
+ requestOptions
+ )
+ .then((response) => response.json())
+ .then(() => setRefrFeedBack(!refrFeedBack))
+ .catch((error) => console.log("error", error))
+ }
+
+ const columns = [
+ { Header: "Name", accessor: "fullname", width: "35%", align: "left" },
+ { Header: "PhoneNumber", accessor: "number", width: "35%", align: "left" },
+ { Header: "information", accessor: "information", width: "45%", align: "left" },
+ { Header: "hide", accessor: "hide", width: "35%", align: "left" },
+ ]
+ const rows = openfeed?.map((data) => ({
+ fullname: (
+
+
+ {data.fullName}
+
+
+ ),
+ number: (
+
+
+ {data.phoneNumber}
+
+
+ ),
+ information: (
+
+
+
+ ),
+ hide: (
+
+ handleSaveFeedback(data.id)}>
+
+
+
+ ),
+ }))
+
+ return (
+
+
+
+
+
+
+
+
+ Feedback controller {swichFeedBack ? "o'qilmadi" : "o'qildi"}
+
+
+
+ setSwichFeedBack(true)}
+ >
+ uqilmadi
+
+
+
+ setSwichFeedBack(false)}
+ >
+ UQILDI
+
+
+
+ Soni:{openfeed.length}
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
+
+export default FeedbackController
diff --git a/src/layouts/new-chaild-controller/index.js b/src/layouts/new-chaild-controller/index.js
new file mode 100644
index 000000000..d0e049d32
--- /dev/null
+++ b/src/layouts/new-chaild-controller/index.js
@@ -0,0 +1,64 @@
+// @mui material components
+import Grid from "@mui/material/Grid"
+import Card from "@mui/material/Card"
+// Material Dashboard 2 React components
+import MDBox from "components/MDBox"
+import MDTypography from "components/MDTypography"
+
+// Material Dashboard 2 React example components
+import DashboardLayout from "examples/LayoutContainers/DashboardLayout"
+import DashboardNavbar from "examples/Navbars/DashboardNavbar"
+import Footer from "examples/Footer"
+import DataTable from "examples/Tables/DataTable"
+
+// Data
+import authorsTableData from "layouts/tables/data/authorsTableData"
+
+
+
+function NewChaildController() {
+ const { columns, rows } = authorsTableData()
+
+
+
+
+ return (
+
+
+
+
+
+
+
+
+ Authors Table
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
+
+export default NewChaildController
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}
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-}
-
-export default RTL;
diff --git a/src/layouts/tables/data/authorsTableData.js b/src/layouts/tables/data/authorsTableData.js
index b561b8be3..ece2739e1 100644
--- a/src/layouts/tables/data/authorsTableData.js
+++ b/src/layouts/tables/data/authorsTableData.js
@@ -1,30 +1,16 @@
/* 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.
-*/
// Material Dashboard 2 React components
-import MDBox from "components/MDBox";
-import MDTypography from "components/MDTypography";
-import MDAvatar from "components/MDAvatar";
-import MDBadge from "components/MDBadge";
+import MDBox from "components/MDBox"
+import MDTypography from "components/MDTypography"
+import MDAvatar from "components/MDAvatar"
+import MDBadge from "components/MDBadge"
// Images
-import team2 from "assets/images/team-2.jpg";
-import team3 from "assets/images/team-3.jpg";
-import team4 from "assets/images/team-4.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 Author = ({ image, name, email }) => (
@@ -37,7 +23,7 @@ export default function data() {
{email}