From 8131f71cf731b27d6b1d282ab6009853fef4af5d Mon Sep 17 00:00:00 2001 From: raunak_k02 Date: Thu, 10 Mar 2022 02:09:02 +0530 Subject: [PATCH 1/2] refactor(components): refactored 'BrowseUploadsHeader', 'Header', 'Table', and 'UploadReuse' components --- .../BrowseUploadsHeader/BrowseUploadsLink.jsx | 48 +++ src/components/BrowseUploadsHeader/index.jsx | 72 +--- .../Header/Dropdowns/HelpPagesDropdown.jsx | 66 ++++ .../Header/Dropdowns/ThemeToggleDropdown.jsx | 40 ++ .../Header/Dropdowns/UserInfoDropdown.jsx | 97 +++++ src/components/Header/HeaderNavLink.jsx | 48 +++ .../Header/NavDropdowns/AdminNavDropdown.jsx | 86 +++++ .../Header/NavDropdowns/JobsNavDropdown.jsx | 47 +++ .../NavDropdowns/OrganizeNavDropdown.jsx | 86 +++++ .../Header/NavDropdowns/UploadNavDropdown.jsx | 65 ++++ src/components/Header/index.jsx | 351 ++---------------- src/components/Table/PaginationTable.jsx | 116 ++++++ src/components/Table/TableUI.jsx | 105 ++++++ src/components/Table/index.jsx | 147 ++------ .../Containers/CheckboxInputContainers.jsx | 85 +++++ .../Containers/SelectInputContainers.jsx | 130 +++++++ .../Upload/CommonFields/UploadReuse/data.js | 21 ++ .../Upload/CommonFields/UploadReuse/index.jsx | 143 +------ 18 files changed, 1119 insertions(+), 634 deletions(-) create mode 100644 src/components/BrowseUploadsHeader/BrowseUploadsLink.jsx create mode 100644 src/components/Header/Dropdowns/HelpPagesDropdown.jsx create mode 100644 src/components/Header/Dropdowns/ThemeToggleDropdown.jsx create mode 100644 src/components/Header/Dropdowns/UserInfoDropdown.jsx create mode 100644 src/components/Header/HeaderNavLink.jsx create mode 100644 src/components/Header/NavDropdowns/AdminNavDropdown.jsx create mode 100644 src/components/Header/NavDropdowns/JobsNavDropdown.jsx create mode 100644 src/components/Header/NavDropdowns/OrganizeNavDropdown.jsx create mode 100644 src/components/Header/NavDropdowns/UploadNavDropdown.jsx create mode 100644 src/components/Table/PaginationTable.jsx create mode 100644 src/components/Table/TableUI.jsx create mode 100644 src/components/Upload/CommonFields/UploadReuse/Containers/CheckboxInputContainers.jsx create mode 100644 src/components/Upload/CommonFields/UploadReuse/Containers/SelectInputContainers.jsx create mode 100644 src/components/Upload/CommonFields/UploadReuse/data.js diff --git a/src/components/BrowseUploadsHeader/BrowseUploadsLink.jsx b/src/components/BrowseUploadsHeader/BrowseUploadsLink.jsx new file mode 100644 index 000000000..11fad6e57 --- /dev/null +++ b/src/components/BrowseUploadsHeader/BrowseUploadsLink.jsx @@ -0,0 +1,48 @@ +/* + Copyright (C) 2021 Shruti Agarwal (mail2shruti.ag@gmail.com) + + SPDX-License-Identifier: GPL-2.0 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +// React Imports +import React from "react"; +import { Link, useLocation } from "react-router-dom"; + +import PropTypes from "prop-types"; + +const BrowseUploadsLink = ({ path, name }) => { + const location = useLocation(); + return ( + <> + + {name} + + + ); +}; + +BrowseUploadsLink.propTypes = { + path: PropTypes.string.isRequired, + name: PropTypes.string.isRequired, +}; + +export default BrowseUploadsLink; diff --git a/src/components/BrowseUploadsHeader/index.jsx b/src/components/BrowseUploadsHeader/index.jsx index 64830981c..e1361424f 100644 --- a/src/components/BrowseUploadsHeader/index.jsx +++ b/src/components/BrowseUploadsHeader/index.jsx @@ -18,7 +18,6 @@ // React Imports import React from "react"; -import { Link, useLocation } from "react-router-dom"; // React Bootstrap Imports import { Navbar } from "react-bootstrap"; @@ -29,8 +28,10 @@ import routes from "constants/routes"; // Helper Functions import { isAuth } from "shared/authHelper"; +// Custom Component +import BrowseUploadsLink from "./BrowseUploadsLink"; + const Header = () => { - const location = useLocation(); return ( <> @@ -40,56 +41,23 @@ const Header = () => { {/* Checking whether the user is authenticated */} {isAuth() && ( <> - - Software Heritage - - - License Browser - - - File Browser - - - Copyright Browser - - - ECC - + + + + + )} diff --git a/src/components/Header/Dropdowns/HelpPagesDropdown.jsx b/src/components/Header/Dropdowns/HelpPagesDropdown.jsx new file mode 100644 index 000000000..0e4eb9ac2 --- /dev/null +++ b/src/components/Header/Dropdowns/HelpPagesDropdown.jsx @@ -0,0 +1,66 @@ +/* + Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + + SPDX-License-Identifier: GPL-2.0 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +// React Imports +import React from "react"; +import { Link } from "react-router-dom"; + +// React Bootstrap Imports +import { Dropdown } from "react-bootstrap"; +import { QuestionCircleFill } from "react-bootstrap-icons"; + +// Routes for all the pages +import routes from "constants/routes"; + +// External Link for documention +import externalLinks from "constants/externalLinks"; + +const HelpPagesDropdown = () => { + return ( + <> + + + + + + + About + + + Getting Started + + + License Browser + + + Documentation + + + Third Party Licenses + + + + + ); +}; + +export default HelpPagesDropdown; diff --git a/src/components/Header/Dropdowns/ThemeToggleDropdown.jsx b/src/components/Header/Dropdowns/ThemeToggleDropdown.jsx new file mode 100644 index 000000000..f40152e42 --- /dev/null +++ b/src/components/Header/Dropdowns/ThemeToggleDropdown.jsx @@ -0,0 +1,40 @@ +/* + Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + + SPDX-License-Identifier: GPL-2.0 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +// React Imports +import React from "react"; + +// React Bootstrap Imports +import { Dropdown } from "react-bootstrap"; + +// Dark Theme Toggle Button +import DarkThemeToggle from "../../DarkThemeToggle/DarkThemeToggle"; + +const ThemeToggleDropdown = () => { + return ( + <> + + + + + + + ); +}; + +export default ThemeToggleDropdown; diff --git a/src/components/Header/Dropdowns/UserInfoDropdown.jsx b/src/components/Header/Dropdowns/UserInfoDropdown.jsx new file mode 100644 index 000000000..cf1e12c34 --- /dev/null +++ b/src/components/Header/Dropdowns/UserInfoDropdown.jsx @@ -0,0 +1,97 @@ +/* + Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + + SPDX-License-Identifier: GPL-2.0 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +// React Imports +import React, { useState } from "react"; +import { useHistory } from "react-router-dom"; + +// React Bootstrap Imports +import { Dropdown } from "react-bootstrap"; +import { PersonCircle } from "react-bootstrap-icons"; + +// Routes for all the pages +import routes from "constants/routes"; + +// List of all accessible groups +import { getAllGroups } from "services/groups"; + +// Widgets +import TextIcon from "components/Widgets/TextIcon"; + +// Helper Functions +import { logout, isAuth, getUserName } from "shared/authHelper"; +import { getLocalStorage, setLocalStorage } from "shared/storageHelper"; +import { getNameInitials } from "shared/helper"; + +const UserInfoDropdown = () => { + const [currentGroup, setCurrentGroup] = useState( + getLocalStorage("currentGroup") || getLocalStorage("user")?.default_group + ); + const history = useHistory(); + const handleLogin = () => { + history.push(routes.home); + }; + const handleGroupChange = (e) => { + setLocalStorage("currentGroup", e.target.innerText); + setCurrentGroup(e.target.innerText); + }; + return ( + <> + {getAllGroups() && ( + + + + + + {getAllGroups().map((group) => ( + + {group.name} + + ))} + + + )} + + + + + {isAuth() ? ( + + + User: {getUserName()} + + + logout(null)}>Log out + + + ) : ( + + Log in + + + )} + + + ); +}; + +export default UserInfoDropdown; diff --git a/src/components/Header/HeaderNavLink.jsx b/src/components/Header/HeaderNavLink.jsx new file mode 100644 index 000000000..e444d0efb --- /dev/null +++ b/src/components/Header/HeaderNavLink.jsx @@ -0,0 +1,48 @@ +/* + Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + + SPDX-License-Identifier: GPL-2.0 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +// React Imports +import React from "react"; +import { Link, useLocation } from "react-router-dom"; + +import PropTypes from "prop-types"; + +// React Bootstrap Imports +import { Nav } from "react-bootstrap"; + +const HeaderNavLink = ({ route, name }) => { + const location = useLocation(); + return ( + <> + + {name} + + + ); +}; + +HeaderNavLink.propTypes = { + route: PropTypes.string.isRequired, + name: PropTypes.string.isRequired, +}; + +export default HeaderNavLink; diff --git a/src/components/Header/NavDropdowns/AdminNavDropdown.jsx b/src/components/Header/NavDropdowns/AdminNavDropdown.jsx new file mode 100644 index 000000000..76032f252 --- /dev/null +++ b/src/components/Header/NavDropdowns/AdminNavDropdown.jsx @@ -0,0 +1,86 @@ +/* + Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + + SPDX-License-Identifier: GPL-2.0 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +// React Imports +import React from "react"; +import { Link } from "react-router-dom"; + +// React Bootstrap Imports +import { NavDropdown, DropdownButton } from "react-bootstrap"; + +// Routes for all the pages +import routes from "constants/routes"; + +const AdminNavDropdown = () => { + return ( + <> + + +
+ + Add Group + + + Delete Group + +
+
+ +
+ + Delete User + +
+
+ +
+ + Add License + + + CSV Export + + + Select License + +
+
+
+ + ); +}; + +export default AdminNavDropdown; diff --git a/src/components/Header/NavDropdowns/JobsNavDropdown.jsx b/src/components/Header/NavDropdowns/JobsNavDropdown.jsx new file mode 100644 index 000000000..7b8a7e19d --- /dev/null +++ b/src/components/Header/NavDropdowns/JobsNavDropdown.jsx @@ -0,0 +1,47 @@ +/* + Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + + SPDX-License-Identifier: GPL-2.0 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +// React Imports +import React from "react"; +import { Link } from "react-router-dom"; + +// React Bootstrap Imports +import { NavDropdown } from "react-bootstrap"; + +// Routes for all the pages +import routes from "constants/routes"; + +const JobsNavDropdown = () => { + return ( + <> + + + My Recent Jobs + + + All Recent Jobs + + + Schedule Agents + + + + ); +}; + +export default JobsNavDropdown; diff --git a/src/components/Header/NavDropdowns/OrganizeNavDropdown.jsx b/src/components/Header/NavDropdowns/OrganizeNavDropdown.jsx new file mode 100644 index 000000000..5bebebcb9 --- /dev/null +++ b/src/components/Header/NavDropdowns/OrganizeNavDropdown.jsx @@ -0,0 +1,86 @@ +/* + Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + + SPDX-License-Identifier: GPL-2.0 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +// React Imports +import React from "react"; +import { Link } from "react-router-dom"; + +// React Bootstrap Imports +import { NavDropdown, DropdownButton } from "react-bootstrap"; + +// Routes for all the pages +import routes from "constants/routes"; + +const OrganizeNavDropdown = () => { + return ( + <> + + +
+ + Create + + + Delete Folder + + + Edit Properties + + + Move or Copy + + + Unlink Content + +
+
+ + Licenses + + +
+ + Delete Uploaded File + + + Edit Properties + + + Move or Copy + +
+
+
+ + ); +}; + +export default OrganizeNavDropdown; diff --git a/src/components/Header/NavDropdowns/UploadNavDropdown.jsx b/src/components/Header/NavDropdowns/UploadNavDropdown.jsx new file mode 100644 index 000000000..53ff09857 --- /dev/null +++ b/src/components/Header/NavDropdowns/UploadNavDropdown.jsx @@ -0,0 +1,65 @@ +/* + Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + + SPDX-License-Identifier: GPL-2.0 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +// React Imports +import React from "react"; +import { Link } from "react-router-dom"; + +// React Bootstrap Imports +import { NavDropdown } from "react-bootstrap"; + +// Routes for all the pages +import routes from "constants/routes"; + +const UploadNavDropdown = () => { + return ( + <> + + + From File + + + From Server + + + From URL + + + From VCS + + + Import Report + + + Instructions + + + One-Shot Analysis + + + One-Shot Copyright/Email/URL + + + One-Shot Monk + + + + ); +}; + +export default UploadNavDropdown; diff --git a/src/components/Header/index.jsx b/src/components/Header/index.jsx index b81d89fff..3eb42d5bc 100644 --- a/src/components/Header/index.jsx +++ b/src/components/Header/index.jsx @@ -17,25 +17,14 @@ */ // React Imports -import React, { useState } from "react"; -import { useHistory, Link, useLocation } from "react-router-dom"; +import React from "react"; +import { Link } from "react-router-dom"; // React Bootstrap Imports -import { - Navbar, - Nav, - NavDropdown, - Dropdown, - DropdownButton, -} from "react-bootstrap"; -import { QuestionCircleFill, PersonCircle } from "react-bootstrap-icons"; - -// List of all accessible groups -import { getAllGroups } from "services/groups"; +import { Navbar, Nav } from "react-bootstrap"; // Widgets import Image from "components/Widgets/Image"; -import TextIcon from "components/Widgets/TextIcon"; // Assets import logo from "assets/images/logo.svg"; @@ -43,30 +32,20 @@ import logo from "assets/images/logo.svg"; // Routes for all the pages import routes from "constants/routes"; -// External Link for documention -import externalLinks from "constants/externalLinks"; - // Helper Functions -import { logout, isAuth, getUserName, isAdmin } from "shared/authHelper"; -import { getLocalStorage, setLocalStorage } from "shared/storageHelper"; -import { getNameInitials } from "shared/helper"; - -// Dark Theme Toggle Button -import DarkThemeToggle from "../DarkThemeToggle/DarkThemeToggle"; +import { isAuth, isAdmin } from "shared/authHelper"; + +// Custom Dropdowns +import UploadNavDropdown from "./NavDropdowns/UploadNavDropdown"; +import JobsNavDropdown from "./NavDropdowns/JobsNavDropdown"; +import OrganizeNavDropdown from "./NavDropdowns/OrganizeNavDropdown"; +import AdminNavDropdown from "./NavDropdowns/AdminNavDropdown"; +import HelpPagesDropdown from "./Dropdowns/HelpPagesDropdown"; +import UserInfoDropdown from "./Dropdowns/UserInfoDropdown"; +import HeaderNavLink from "./HeaderNavLink"; +import ThemeToggleDropdown from "./Dropdowns/ThemeToggleDropdown"; const Header = () => { - const [currentGroup, setCurrentGroup] = useState( - getLocalStorage("currentGroup") || getLocalStorage("user")?.default_group - ); - const history = useHistory(); - const location = useLocation(); - const handleLogin = () => { - history.push(routes.home); - }; - const handleGroupChange = (e) => { - setLocalStorage("currentGroup", e.target.innerText); - setCurrentGroup(e.target.innerText); - }; return ( <> { - - - - - + + {/* Toggle Theme Dropdown */} + + {/* Help Pages */} - - - - - - - About - - - Getting Started - - - License Browser - - - Documentation - - - Third Party Licenses - - - + {/* User Info */} - {getAllGroups() && ( - - - - - - {getAllGroups().map((group) => ( - - {group.name} - - ))} - - - )} - - - - - {isAuth() ? ( - - - User: {getUserName()} - - - logout(null)}> - Log out - - - - ) : ( - - Log in - - - )} - + diff --git a/src/components/Table/PaginationTable.jsx b/src/components/Table/PaginationTable.jsx new file mode 100644 index 000000000..fda405b46 --- /dev/null +++ b/src/components/Table/PaginationTable.jsx @@ -0,0 +1,116 @@ +/* + Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com) + + SPDX-License-Identifier: GPL-2.0 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +import React from "react"; +import "./index.css"; +import { PropTypes } from "prop-types"; + +const PaginationTable = ({ + canPreviousPage, + canNextPage, + length, + pageCount, + gotoPage, + nextPage, + previousPage, + setPageSize, + pageIndex, + pageSize, +}) => { + return ( + <> +
+ {" "} + {" "} + {" "} + {" "} + + Page{" "} + + {pageIndex + 1} of {length} + {" "} + + + | Go to page:{" "} + { + const pageNumber = e.target.value + ? Number(e.target.value) - 1 + : 0; + gotoPage(pageNumber); + }} + style={{ width: "100px" }} + /> + {" "} + +
+ + ); +}; + +PaginationTable.propTypes = { + canPreviousPage: PropTypes.bool.isRequired, + canNextPage: PropTypes.bool.isRequired, + length: PropTypes.number, + pageCount: PropTypes.number, + gotoPage: PropTypes.func, + nextPage: PropTypes.func, + previousPage: PropTypes.func, + setPageSize: PropTypes.func, + pageIndex: PropTypes.number, + pageSize: PropTypes.number, +}; + +export default PaginationTable; diff --git a/src/components/Table/TableUI.jsx b/src/components/Table/TableUI.jsx new file mode 100644 index 000000000..69f1a4793 --- /dev/null +++ b/src/components/Table/TableUI.jsx @@ -0,0 +1,105 @@ +/* + Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com) + + SPDX-License-Identifier: GPL-2.0 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +import React from "react"; +import CloseIcon from "assets/images/close.png"; +import "./index.css"; +import { PropTypes } from "prop-types"; + +const TableUI = ({ + getTableProps, + getTableBodyProps, + headerGroups, + prepareRow, + page, +}) => { + return ( + <> + + + {headerGroups.map((headerGroup) => ( + + {headerGroup.headers.map((column) => ( + + ))} + + ))} + + + {page.map((row) => { + prepareRow(row); + return ( + + {row.cells.map((cell) => { + if (cell.column.id === "delete") { + return ( + + ); + } + return ( + + ); + })} + + ); + })} + +
+ {column.render("Header")} + + {/* eslint-disable no-nested-ternary */} + {column.isSorted + ? column.isSortedDesc + ? " 🔽" + : " 🔼" + : ""} + +
+ + + {cell.render("Cell")}
+ + ); +}; + +TableUI.propTypes = { + getTableProps: PropTypes.func, + getTableBodyProps: PropTypes.func, + headerGroups: PropTypes.arrayOf(PropTypes.object), + prepareRow: PropTypes.func, + page: PropTypes.arrayOf(PropTypes.object), +}; + +export default TableUI; diff --git a/src/components/Table/index.jsx b/src/components/Table/index.jsx index c4b177783..30def6db8 100644 --- a/src/components/Table/index.jsx +++ b/src/components/Table/index.jsx @@ -18,9 +18,11 @@ import React from "react"; import { useTable, usePagination, useRowSelect, useSortBy } from "react-table"; -import CloseIcon from "assets/images/close.png"; import IndeterminateCheckbox from "./IndeterminateCheckbox"; -import "./index.css"; + +// custom components +import PaginationTable from "./PaginationTable"; +import TableUI from "./TableUI"; /* eslint-disable react/prop-types */ const Table = ({ columns, data }) => { @@ -76,128 +78,25 @@ const Table = ({ columns, data }) => { // Render the UI for your table return ( <> - - - {headerGroups.map((headerGroup) => ( - - {headerGroup.headers.map((column) => ( - - ))} - - ))} - - - {page.map((row) => { - prepareRow(row); - return ( - - {row.cells.map((cell) => { - if (cell.column.id === "delete") { - return ( - - ); - } - return ( - - ); - })} - - ); - })} - -
- {column.render("Header")} - - {/* eslint-disable no-nested-ternary */} - {column.isSorted - ? column.isSortedDesc - ? " 🔽" - : " 🔼" - : ""} - -
- - - {cell.render("Cell")}
-
- {" "} - {" "} - {" "} - {" "} - - Page{" "} - - {pageIndex + 1} of {pageOptions.length} - {" "} - - - | Go to page:{" "} - { - const pageNumber = e.target.value - ? Number(e.target.value) - 1 - : 0; - gotoPage(pageNumber); - }} - style={{ width: "100px" }} - /> - {" "} - -
+ + ); }; diff --git a/src/components/Upload/CommonFields/UploadReuse/Containers/CheckboxInputContainers.jsx b/src/components/Upload/CommonFields/UploadReuse/Containers/CheckboxInputContainers.jsx new file mode 100644 index 000000000..093b40613 --- /dev/null +++ b/src/components/Upload/CommonFields/UploadReuse/Containers/CheckboxInputContainers.jsx @@ -0,0 +1,85 @@ +/* + Copyright (C) 2021 Shruti Agarwal (mail2shruti.ag@gmail.com), Aman Dwivedi (aman.dwivedi5@gmail.com) + + SPDX-License-Identifier: GPL-2.0 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +import React from "react"; + +// Widgets +import { InputContainer, Tooltip } from "components/Widgets"; + +import { PropTypes } from "prop-types"; + +const CheckboxInputContainers = ({ reuse, handleChange }) => { + return ( + <> + + Enhanced reuse (slower) + + + + Reuse main license/s + + + + Reuse report configuration settings + + + + Reuse edited and deactivated copyrights + + + + ); +}; + +CheckboxInputContainers.propTypes = { + reuse: PropTypes.shape({ + reuseUpload: PropTypes.number.isRequired, + reuseGroup: PropTypes.string.isRequired, + reuseMain: PropTypes.bool.isRequired, + reuseEnhanced: PropTypes.bool.isRequired, + reuseReport: PropTypes.bool.isRequired, + reuseCopyright: PropTypes.bool.isRequired, + }).isRequired, + handleChange: PropTypes.func, +}; + +export default CheckboxInputContainers; diff --git a/src/components/Upload/CommonFields/UploadReuse/Containers/SelectInputContainers.jsx b/src/components/Upload/CommonFields/UploadReuse/Containers/SelectInputContainers.jsx new file mode 100644 index 000000000..417fc4a5a --- /dev/null +++ b/src/components/Upload/CommonFields/UploadReuse/Containers/SelectInputContainers.jsx @@ -0,0 +1,130 @@ +/* + Copyright (C) 2021 Shruti Agarwal (mail2shruti.ag@gmail.com), Aman Dwivedi (aman.dwivedi5@gmail.com) + + SPDX-License-Identifier: GPL-2.0 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +import React, { useState, useEffect } from "react"; + +// Widgets +import { InputContainer } from "components/Widgets"; + +// Required services for calling APIs +import { getAllFolders } from "services/folders"; +import { getUploadsFolderId } from "services/organizeUploads"; +import { getAllGroups } from "services/groups"; + +import { PropTypes } from "prop-types"; + +import messages from "constants/messages"; + +// required data +import { + initialGroupList, + initialFolderList, + initialUploadList, +} from "../data"; + +const SelectInputContainers = ({ reuse, handleChange }) => { + const [reuseData, setReuseData] = useState({ + groupList: initialGroupList, + folderList: initialFolderList, + uploadList: initialUploadList, + reuseFolder: 1, + }); + + useEffect(() => { + setReuseData((prevData) => ({ ...prevData, groupList: getAllGroups() })); + }, []); + + useEffect(() => { + getAllFolders(reuse.reuseGroup) + .then((res) => { + setReuseData((prevData) => ({ ...prevData, folderList: res })); + }) + .catch(() => {}); + }, [reuse.reuseGroup]); + + useEffect(() => { + getUploadsFolderId(reuseData.reuseFolder, reuse.reuseGroup) + .then((res) => { + setReuseData((prevData) => ({ ...prevData, uploadList: res })); + }) + .catch(() => {}); + }, [reuse.reuseGroup, reuseData.reuseFolder]); + + const handleReuseDataChange = (e) => { + setReuseData((prevData) => ({ + ...prevData, + [e.target.name]: e.target.value, + })); + }; + return ( + <> + + Select the reuse group: + + + Select the reuse folder: + + + Select the reuse upload: + + + ); +}; + +SelectInputContainers.propTypes = { + reuse: PropTypes.shape({ + reuseUpload: PropTypes.number.isRequired, + reuseGroup: PropTypes.string.isRequired, + reuseMain: PropTypes.bool.isRequired, + reuseEnhanced: PropTypes.bool.isRequired, + reuseReport: PropTypes.bool.isRequired, + reuseCopyright: PropTypes.bool.isRequired, + }).isRequired, + handleChange: PropTypes.func, +}; + +export default SelectInputContainers; diff --git a/src/components/Upload/CommonFields/UploadReuse/data.js b/src/components/Upload/CommonFields/UploadReuse/data.js new file mode 100644 index 000000000..04ee76e2e --- /dev/null +++ b/src/components/Upload/CommonFields/UploadReuse/data.js @@ -0,0 +1,21 @@ +const initialGroupList = [{ id: 3, name: "fossy" }]; + +const initialFolderList = [ + { + id: 1, + name: "Software Repository", + description: "Top Folder", + parent: null, + }, +]; + +const initialUploadList = [ + { + folderId: 1, + uploadId: null, + uploadName: "", + uploadDescription: "", + }, +]; + +export { initialGroupList, initialFolderList, initialUploadList }; diff --git a/src/components/Upload/CommonFields/UploadReuse/index.jsx b/src/components/Upload/CommonFields/UploadReuse/index.jsx index cd77da9ab..c3977c1ff 100644 --- a/src/components/Upload/CommonFields/UploadReuse/index.jsx +++ b/src/components/Upload/CommonFields/UploadReuse/index.jsx @@ -16,155 +16,24 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React, { useState, useEffect } from "react"; +import React from "react"; import PropTypes from "prop-types"; // Widgets -import { InputContainer, Tooltip } from "components/Widgets"; +import { Tooltip } from "components/Widgets"; -// Required services for calling APIs -import { getAllFolders } from "services/folders"; -import { getUploadsFolderId } from "services/organizeUploads"; -import { getAllGroups } from "services/groups"; - -import messages from "constants/messages"; +import SelectInputContainers from "./Containers/SelectInputContainers"; +import CheckboxInputContainers from "./Containers/CheckboxInputContainers"; const UploadReuse = ({ reuse, handleChange }) => { - const initialGroupList = [{ id: 3, name: "fossy" }]; - const initialFolderList = [ - { - id: 1, - name: "Software Repository", - description: "Top Folder", - parent: null, - }, - ]; - const initialUploadList = [ - { - folderId: 1, - uploadId: null, - uploadName: "", - uploadDescription: "", - }, - ]; - const [reuseData, setReuseData] = useState({ - groupList: initialGroupList, - folderList: initialFolderList, - uploadList: initialUploadList, - reuseFolder: 1, - }); - - useEffect(() => { - setReuseData((prevData) => ({ ...prevData, groupList: getAllGroups() })); - }, []); - - useEffect(() => { - getAllFolders(reuse.reuseGroup) - .then((res) => { - setReuseData((prevData) => ({ ...prevData, folderList: res })); - }) - .catch(() => {}); - }, [reuse.reuseGroup]); - - useEffect(() => { - getUploadsFolderId(reuseData.reuseFolder, reuse.reuseGroup) - .then((res) => { - setReuseData((prevData) => ({ ...prevData, uploadList: res })); - }) - .catch(() => {}); - }, [reuse.reuseGroup, reuseData.reuseFolder]); - - const handleReuseDataChange = (e) => { - setReuseData((prevData) => ({ - ...prevData, - [e.target.name]: e.target.value, - })); - }; - return (

(Optional) Reuse

- - Select the reuse group: - - - Select the reuse folder: - - - Select the reuse upload: - - - Enhanced reuse (slower) - - - - Reuse main license/s - - - - Reuse report configuration settings - - - - Reuse edited and deactivated copyrights - - + +
); }; From 694c35e68530a27309bc67993314f543960de97c Mon Sep 17 00:00:00 2001 From: raunak_k02 Date: Thu, 10 Mar 2022 21:18:00 +0530 Subject: [PATCH 2/2] chore(copyright notice): added name in the copyright notice of modified files --- .../BrowseUploadsHeader/BrowseUploadsLink.jsx | 1 + src/components/BrowseUploadsHeader/index.jsx | 1 + .../Header/Dropdowns/HelpPagesDropdown.jsx | 1 + .../Header/Dropdowns/ThemeToggleDropdown.jsx | 1 + .../Header/Dropdowns/UserInfoDropdown.jsx | 1 + src/components/Header/HeaderNavLink.jsx | 1 + .../Header/NavDropdowns/AdminNavDropdown.jsx | 1 + .../Header/NavDropdowns/JobsNavDropdown.jsx | 1 + .../NavDropdowns/OrganizeNavDropdown.jsx | 1 + .../Header/NavDropdowns/UploadNavDropdown.jsx | 1 + src/components/Header/index.jsx | 1 + src/components/Table/PaginationTable.jsx | 1 + src/components/Table/TableUI.jsx | 1 + src/components/Table/index.jsx | 1 + .../Containers/CheckboxInputContainers.jsx | 1 + .../Containers/SelectInputContainers.jsx | 1 + .../Upload/CommonFields/UploadReuse/data.js | 20 +++++++++++++++++++ .../Upload/CommonFields/UploadReuse/index.jsx | 1 + 18 files changed, 37 insertions(+) diff --git a/src/components/BrowseUploadsHeader/BrowseUploadsLink.jsx b/src/components/BrowseUploadsHeader/BrowseUploadsLink.jsx index 11fad6e57..9dc3dcfd6 100644 --- a/src/components/BrowseUploadsHeader/BrowseUploadsLink.jsx +++ b/src/components/BrowseUploadsHeader/BrowseUploadsLink.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Shruti Agarwal (mail2shruti.ag@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/BrowseUploadsHeader/index.jsx b/src/components/BrowseUploadsHeader/index.jsx index e1361424f..687cb6ec1 100644 --- a/src/components/BrowseUploadsHeader/index.jsx +++ b/src/components/BrowseUploadsHeader/index.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Shruti Agarwal (mail2shruti.ag@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/Header/Dropdowns/HelpPagesDropdown.jsx b/src/components/Header/Dropdowns/HelpPagesDropdown.jsx index 0e4eb9ac2..b6b39fd80 100644 --- a/src/components/Header/Dropdowns/HelpPagesDropdown.jsx +++ b/src/components/Header/Dropdowns/HelpPagesDropdown.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/Header/Dropdowns/ThemeToggleDropdown.jsx b/src/components/Header/Dropdowns/ThemeToggleDropdown.jsx index f40152e42..ec2bb7692 100644 --- a/src/components/Header/Dropdowns/ThemeToggleDropdown.jsx +++ b/src/components/Header/Dropdowns/ThemeToggleDropdown.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/Header/Dropdowns/UserInfoDropdown.jsx b/src/components/Header/Dropdowns/UserInfoDropdown.jsx index cf1e12c34..d227c9edc 100644 --- a/src/components/Header/Dropdowns/UserInfoDropdown.jsx +++ b/src/components/Header/Dropdowns/UserInfoDropdown.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/Header/HeaderNavLink.jsx b/src/components/Header/HeaderNavLink.jsx index e444d0efb..5ed63a9a2 100644 --- a/src/components/Header/HeaderNavLink.jsx +++ b/src/components/Header/HeaderNavLink.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/Header/NavDropdowns/AdminNavDropdown.jsx b/src/components/Header/NavDropdowns/AdminNavDropdown.jsx index 76032f252..d42ebf7a2 100644 --- a/src/components/Header/NavDropdowns/AdminNavDropdown.jsx +++ b/src/components/Header/NavDropdowns/AdminNavDropdown.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/Header/NavDropdowns/JobsNavDropdown.jsx b/src/components/Header/NavDropdowns/JobsNavDropdown.jsx index 7b8a7e19d..eb8d7444b 100644 --- a/src/components/Header/NavDropdowns/JobsNavDropdown.jsx +++ b/src/components/Header/NavDropdowns/JobsNavDropdown.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/Header/NavDropdowns/OrganizeNavDropdown.jsx b/src/components/Header/NavDropdowns/OrganizeNavDropdown.jsx index 5bebebcb9..7f455875c 100644 --- a/src/components/Header/NavDropdowns/OrganizeNavDropdown.jsx +++ b/src/components/Header/NavDropdowns/OrganizeNavDropdown.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/Header/NavDropdowns/UploadNavDropdown.jsx b/src/components/Header/NavDropdowns/UploadNavDropdown.jsx index 53ff09857..10be5fc48 100644 --- a/src/components/Header/NavDropdowns/UploadNavDropdown.jsx +++ b/src/components/Header/NavDropdowns/UploadNavDropdown.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/Header/index.jsx b/src/components/Header/index.jsx index 3eb42d5bc..1f0f4b1fe 100644 --- a/src/components/Header/index.jsx +++ b/src/components/Header/index.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/Table/PaginationTable.jsx b/src/components/Table/PaginationTable.jsx index fda405b46..cdae3b11b 100644 --- a/src/components/Table/PaginationTable.jsx +++ b/src/components/Table/PaginationTable.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/Table/TableUI.jsx b/src/components/Table/TableUI.jsx index 69f1a4793..33d719ca4 100644 --- a/src/components/Table/TableUI.jsx +++ b/src/components/Table/TableUI.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/Table/index.jsx b/src/components/Table/index.jsx index 30def6db8..d7da950d2 100644 --- a/src/components/Table/index.jsx +++ b/src/components/Table/index.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/Upload/CommonFields/UploadReuse/Containers/CheckboxInputContainers.jsx b/src/components/Upload/CommonFields/UploadReuse/Containers/CheckboxInputContainers.jsx index 093b40613..cdda9418c 100644 --- a/src/components/Upload/CommonFields/UploadReuse/Containers/CheckboxInputContainers.jsx +++ b/src/components/Upload/CommonFields/UploadReuse/Containers/CheckboxInputContainers.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Shruti Agarwal (mail2shruti.ag@gmail.com), Aman Dwivedi (aman.dwivedi5@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/Upload/CommonFields/UploadReuse/Containers/SelectInputContainers.jsx b/src/components/Upload/CommonFields/UploadReuse/Containers/SelectInputContainers.jsx index 417fc4a5a..7665a4bde 100644 --- a/src/components/Upload/CommonFields/UploadReuse/Containers/SelectInputContainers.jsx +++ b/src/components/Upload/CommonFields/UploadReuse/Containers/SelectInputContainers.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Shruti Agarwal (mail2shruti.ag@gmail.com), Aman Dwivedi (aman.dwivedi5@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0 diff --git a/src/components/Upload/CommonFields/UploadReuse/data.js b/src/components/Upload/CommonFields/UploadReuse/data.js index 04ee76e2e..0cb9ba6f7 100644 --- a/src/components/Upload/CommonFields/UploadReuse/data.js +++ b/src/components/Upload/CommonFields/UploadReuse/data.js @@ -1,3 +1,23 @@ +/* + Copyright (C) 2021 Aman Dwivedi (aman.dwivedi5@gmail.com), Shruti Agarwal (mail2shruti.ag@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) + + SPDX-License-Identifier: GPL-2.0 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +// Data used by "./Containers/SelectInputContainers.jsx" const initialGroupList = [{ id: 3, name: "fossy" }]; const initialFolderList = [ diff --git a/src/components/Upload/CommonFields/UploadReuse/index.jsx b/src/components/Upload/CommonFields/UploadReuse/index.jsx index c3977c1ff..901baba87 100644 --- a/src/components/Upload/CommonFields/UploadReuse/index.jsx +++ b/src/components/Upload/CommonFields/UploadReuse/index.jsx @@ -1,5 +1,6 @@ /* Copyright (C) 2021 Shruti Agarwal (mail2shruti.ag@gmail.com), Aman Dwivedi (aman.dwivedi5@gmail.com) + Copyright (C) 2022 Raunak Kumar (raunakk728@gmail.com) SPDX-License-Identifier: GPL-2.0