From eb20a727bd687caa12e90a24e0ca6ef78b00aa51 Mon Sep 17 00:00:00 2001 From: Anurag Pal Date: Tue, 18 Jul 2023 10:53:48 +0530 Subject: [PATCH 1/2] home done --- src/pages/Home/Home.tsx | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/pages/Home/Home.tsx b/src/pages/Home/Home.tsx index d19198b1..7efaae88 100644 --- a/src/pages/Home/Home.tsx +++ b/src/pages/Home/Home.tsx @@ -1,11 +1,4 @@ -import { - Button, - InputField, - Card, - NotificationCard, - Sidebar, - StyledMUISelect, -} from "../../components"; +import { Card } from "../../components"; import styles from "./Home.module.scss"; import { useContext, useEffect, useState } from "react"; import { Box, Grid, Skeleton } from "@mui/material"; @@ -13,10 +6,8 @@ import yellowFlag from "../../assets/icons/yellowFlag.svg"; import blueUsers from "../../assets/icons/blueUsers.svg"; import redWarning from "../../assets/icons/redWarning.svg"; import greenCrown from "../../assets/icons/greenCrown.svg"; -import Users from "../../assets/icons/users.svg"; import monitor from "../../assets/icons/monitor.svg"; import edit from "../../assets/icons/edit.svg"; -import calendarImage from "../../assets/images/calendar.svg"; import CustomModal from "../../components/CustomModal/CustomModal"; import React from "react"; import { TestContext } from "../../utils/contexts/TestContext"; @@ -27,6 +18,7 @@ import { AuthContext } from "../../utils/auth/AuthContext"; import MainLayout from "../../layouts/MainLayout"; import ScheduleCalendar from "./ScheduleCalendar/ScheduleCalendar"; import { ITest } from "../../utils/interfaces"; +import { Select } from "antd"; interface SubCardProps { title: string; @@ -245,12 +237,13 @@ const Home = () => { ({ name: test.name, value: test.name, }))} + placeholder="Recent Tests" + style={{ width: "200px" }} value={recentTestValue} onChange={(e) => { setrecentTestValue(e); @@ -306,12 +299,13 @@ const Home = () => { ({ name: test.name, value: test.name, }))} + placeholder="Recent Tests" + style={{ width: "200px" }} value={recentTestValue} onChange={(e) => { setrecentTestValue(e); From 1d46e1de3f8388b6ea9c73547a204a20f77215f4 Mon Sep 17 00:00:00 2001 From: Anurag Pal Date: Tue, 18 Jul 2023 11:23:50 +0530 Subject: [PATCH 2/2] questions done, removed IconButton --- src/pages/Questions/Questions.tsx | 124 ++++++++++-------------------- 1 file changed, 41 insertions(+), 83 deletions(-) diff --git a/src/pages/Questions/Questions.tsx b/src/pages/Questions/Questions.tsx index c3ba3cd8..ddef641c 100644 --- a/src/pages/Questions/Questions.tsx +++ b/src/pages/Questions/Questions.tsx @@ -7,23 +7,12 @@ import { HTMLAttributes, } from "react"; import styles from "./Questions.module.scss"; -import { - Sidebar, - Button, - Card, - InputField, - CustomTable, -} from "../../components"; +import { Sidebar, Card, CustomTable } from "../../components"; import "react-quill/dist/quill.snow.css"; -import Objective from "./Objective/Objective"; -import Integer from "./Integer/Integer"; -import Paragraph from "./Paragraph/Paragraph"; -import { PreviewHTMLModal, QuestionsTable } from "./components"; -import MatrixMatch from "./MatrixMatch/MatrixMatch"; -import { IQuestionObjective, IQuestionInteger } from "../../utils/interfaces"; +import { PreviewHTMLModal } from "./components"; import { AuthContext } from "../../utils/auth/AuthContext"; import { usePermission } from "../../utils/contexts/PermissionsContext"; -import { PERMISSIONS, QUESTION_COLS_ALL } from "../../utils/constants"; +import { PERMISSIONS } from "../../utils/constants"; import { Error } from ".."; import { CSVLink } from "react-csv"; import { useReactToPrint } from "react-to-print"; @@ -31,63 +20,42 @@ import { useNavigate } from "react-router-dom"; import { Grid, IconButton } from "@mui/material"; import logo from "../../assets/images/logo.svg"; import { saveAs } from "file-saver"; -import { - CheckCircle, - DeleteOutline, - Visibility, - Warning, -} from "@mui/icons-material"; import RenderWithLatex from "../../components/RenderWithLatex/RenderWithLatex"; import { API_QUESTIONS } from "../../utils/api/config"; import PrintIcon from "@mui/icons-material/Print"; -import sheetIcon from "../../assets/icons/sheets.svg"; import MainLayout from "../../layouts/MainLayout"; -import { Badge, Divider, message, Select, Tag } from "antd"; +import { Divider, message, Select, Tag } from "antd"; import { ToggleButton } from "../../components"; import CustomPopConfirm from "../../components/PopConfirm/CustomPopConfirm"; -import Edit from "@mui/icons-material/Edit"; -import AddIcon from "@mui/icons-material/Add"; import { getTopics } from "../../utils/constants"; import { TestContext } from "../../utils/contexts/TestContext"; import type { CustomTagProps } from "rc-select/lib/BaseSelect"; -import { Input } from "antd"; -import CheckBox from "@mui/icons-material/CheckBox"; -import clsx from "clsx"; +import { Input, Button } from "antd"; import RenderQuestion from "./components/DisplayQuestion/RenderQuestion"; +import { + CheckCircleFilled, + DeleteOutlined, + EditFilled, + EditOutlined, + FileExcelOutlined, + PlusOutlined, + WarningFilled, +} from "@ant-design/icons"; const { Search } = Input; export const questionTypes = [ { name: "Objective", value: "objective" }, - // { name: "Multiple Correct", value: "multiple" }, { name: "Integer Type", value: "integer" }, { name: "Paragraph", value: "paragraph" }, { name: "Matrix Match", value: "matrix" }, ]; -// export const topicOptions = [ -// { name: `Coulomb's law`, value: "coulombsLaw" }, -// { name: "Organic", value: "organic" }, -// { name: "Hydrocarbons", value: "hydrocarbons" }, -// { name: "Probability", value: "probability" }, -// { name: "Tangets", value: "tangets" }, -// { name: "Ideal Gas Equation", value: "idealGasEquation" }, -// { name: "Dual Nature", value: "dualNature" }, -// { name: "Normals", value: "normals" }, -// { name: `Newton's Law of Motion`, value: "newtonsLawofMotion" }, -// ]; - export const difficultyLevels = [ { name: "Easy", value: "Easy" }, { name: "Medium", value: "Medium" }, { name: "Hard", value: "Hard" }, ]; -export const sources = [ - { name: "Bansal Classes", value: "bansalClasses" }, - { name: "Allen", value: "allen" }, - { name: "Catalyser", value: "catalyser" }, -]; - export const examList = [ { name: "JEE MAINS", @@ -548,41 +516,29 @@ const Questions = () => { */} - - - Sheet - - + + +   - {/* setGlobalSearch(e.target.value)} - type="text" - /> */}