From 650791914dbb31e23ea0924941ac0d2bcaa479ef Mon Sep 17 00:00:00 2001 From: Mohammad Khalilzadeh Date: Fri, 20 Sep 2024 17:16:20 +0330 Subject: [PATCH 1/5] back button, filter, page title, add vender --- .../assets/icons/left-arrow-long.svg | 3 + .../containers/Dashboard/index.tsx | 7 +- .../src/presentation/pages/Vendors/index.css | 0 .../src/presentation/pages/Vendors/index.tsx | 103 +++++++++++++++++- 4 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 Clients/src/presentation/assets/icons/left-arrow-long.svg create mode 100644 Clients/src/presentation/pages/Vendors/index.css diff --git a/Clients/src/presentation/assets/icons/left-arrow-long.svg b/Clients/src/presentation/assets/icons/left-arrow-long.svg new file mode 100644 index 00000000..db9b827e --- /dev/null +++ b/Clients/src/presentation/assets/icons/left-arrow-long.svg @@ -0,0 +1,3 @@ + + + diff --git a/Clients/src/presentation/containers/Dashboard/index.tsx b/Clients/src/presentation/containers/Dashboard/index.tsx index 7587167c..ba6b2195 100644 --- a/Clients/src/presentation/containers/Dashboard/index.tsx +++ b/Clients/src/presentation/containers/Dashboard/index.tsx @@ -5,7 +5,12 @@ import { Outlet } from "react-router"; const Dashboard = () => { return ( - + diff --git a/Clients/src/presentation/pages/Vendors/index.css b/Clients/src/presentation/pages/Vendors/index.css new file mode 100644 index 00000000..e69de29b diff --git a/Clients/src/presentation/pages/Vendors/index.tsx b/Clients/src/presentation/pages/Vendors/index.tsx index cb1b6f58..c1b17615 100644 --- a/Clients/src/presentation/pages/Vendors/index.tsx +++ b/Clients/src/presentation/pages/Vendors/index.tsx @@ -1,5 +1,106 @@ +import { Button, Stack, Typography, useTheme } from "@mui/material"; +import { ReactComponent as Back } from "../../assets/icons/left-arrow-long.svg"; +import Select from "../../components/Inputs/Select"; +import "./index.css"; + const Vendors = () => { - return
Vendors
; + const theme = useTheme(); + + return ( +
+ + + + + + Currently viewing project: + + {}} + value={"Select review status"} + sx={{ + width: 350, + }} + /> + {}} + value={"Select risk status"} + sx={{ + width: 350, + }} + /> + + + + + + + Item Two + + + + ); +}; + +export default AddNewVendor; diff --git a/Clients/src/presentation/pages/Vendors/index.tsx b/Clients/src/presentation/pages/Vendors/index.tsx index dbfa211d..9d1f697e 100644 --- a/Clients/src/presentation/pages/Vendors/index.tsx +++ b/Clients/src/presentation/pages/Vendors/index.tsx @@ -3,9 +3,22 @@ import { ReactComponent as Back } from "../../assets/icons/left-arrow-long.svg"; import Select from "../../components/Inputs/Select"; import "./index.css"; import TableWithPlaceholder from "../../components/Table/WithPlaceholder"; +import { useState } from "react"; + +import AddNewVendor from "../../components/Modals/NewVendor"; const Vendors = () => { const theme = useTheme(); + const [isOpen, setIsOpen] = useState(false); + const [value, setValue] = useState("1"); + + const openAddNewVendor = () => { + setIsOpen(true); + }; + + const handleChange = (_: React.SyntheticEvent, newValue: string) => { + setValue(newValue); + }; return (
@@ -14,7 +27,7 @@ const Vendors = () => { justifyContent={"space-between"} display={"flex"} flexDirection={"row"} - marginBottom={theme.spacing(10)} + marginBottom={theme.spacing(6)} > @@ -127,6 +142,12 @@ const Vendors = () => { + setIsOpen(false)} + value={value} + />
); }; From ab0fca1e047f16cba502dad8d732228ebae8d1d0 Mon Sep 17 00:00:00 2001 From: Mohammad Khalilzadeh Date: Tue, 24 Sep 2024 11:54:45 +0330 Subject: [PATCH 5/5] Vendor view design --- .../components/Modals/NewVendor/index.tsx | 360 +++++++++++++----- .../Table/WithPlaceholder/index.tsx | 22 ++ .../src/presentation/mocks/vendors.data.ts | 48 --- 3 files changed, 280 insertions(+), 150 deletions(-) diff --git a/Clients/src/presentation/components/Modals/NewVendor/index.tsx b/Clients/src/presentation/components/Modals/NewVendor/index.tsx index 6eb9725e..cfaca25a 100644 --- a/Clients/src/presentation/components/Modals/NewVendor/index.tsx +++ b/Clients/src/presentation/components/Modals/NewVendor/index.tsx @@ -42,8 +42,259 @@ const AddNewVendor: React.FC = ({ handleChange, }) => { const theme = useTheme(); + + const vendorDetailsPanel = ( + + + + + + + + + + + + + + + + {}} + value={"Select reviewer"} + sx={{ + width: 350, + }} + /> + + + + {}} + value={"Select project"} + sx={{ + width: 350, + }} + /> + {}} + value={"Select impact"} + sx={{ + width: 350, + }} + /> + {}} + value={"Select risk severity"} + sx={{ + width: 350, + }} + /> + {}} + value={"Select risk level"} + sx={{ + width: 350, + }} + /> + + + ); return ( - + setIsOpen()} + sx={{ overflowY: "scroll" }} + > = ({ > Add new vendor - + = ({ /> = ({ /> - - - - - - - - - - - - - - - - {}} - value={"Select reviewer"} - sx={{ - width: 350, - }} - /> - - - -