| @@ -269,7 +269,7 @@ | |||
| .candidates-pagination { | |||
| margin-top: 20px; | |||
| margin-left: 350px; | |||
| align-self: center; | |||
| padding-bottom: 20px; | |||
| } | |||
| @@ -34,7 +34,7 @@ | |||
| .files-page-card-add-button { | |||
| padding-bottom: 36px; | |||
| display: flex; | |||
| justify-content: flex-end; | |||
| justify-content: space-between; | |||
| } | |||
| .files-page-drag-and-drop { | |||
| @@ -48,4 +48,8 @@ | |||
| .search-field{ | |||
| margin-right: 30px; | |||
| margin-left: 0px; | |||
| } | |||
| .filesPage{ | |||
| align-self: flex-end; | |||
| } | |||
| @@ -10,6 +10,8 @@ | |||
| } | |||
| } | |||
| .table-cont { | |||
| display: flex; | |||
| flex-direction: column; | |||
| @include media-below($bp-xl) { | |||
| overflow-x: auto !important; | |||
| } | |||
| @@ -38,7 +38,6 @@ import en from "../../assets/images/en.png"; | |||
| const NavbarComponent = () => { | |||
| const navItems = [ | |||
| "users", | |||
| "files", | |||
| "filesView", | |||
| // "signOut" | |||
| ]; | |||
| @@ -14,8 +14,10 @@ import { | |||
| } from "../../store/actions/tags/tagsAction"; | |||
| import { selectTags } from "../../store/selectors/tagsSelector"; | |||
| import { uploadFileReq } from "../../store/actions/uploadFile/uploadFileActions"; | |||
| import { FILES_VIEW_PAGE } from "../../constants/pages"; | |||
| import PropTypes from "prop-types"; | |||
| const FilesPage = () => { | |||
| const FilesPage = ({history}) => { | |||
| const [dropzoneActive, setDropzoneActive] = useState(false); | |||
| const [pdfFile, setPdfFile] = useState(null); | |||
| const [title, setTitle] = useState(""); | |||
| @@ -33,6 +35,7 @@ const FilesPage = () => { | |||
| const onSuccessUploadFile = () => { | |||
| dispatch(resetIsCheckedTagsValue()); | |||
| setPdfFile(null); | |||
| setTitle("") | |||
| }; | |||
| const handleDrop = (e) => { | |||
| @@ -198,7 +201,13 @@ const FilesPage = () => { | |||
| </div> | |||
| <div className="files-page-card"> | |||
| <div className="files-page-card-add-button"> | |||
| <div className="files-page-card-add-button" style={{alignItems:'center'}}> | |||
| <p | |||
| className="applicant-ads-back-button" | |||
| onClick={() => history.push(FILES_VIEW_PAGE)} | |||
| > | |||
| Nazad na sve fajlove | |||
| </p> | |||
| <IconButton | |||
| className="c-btn ads-page-btn c-btn--primary add-ad-btn" | |||
| onClick={uploadFileHandler} | |||
| @@ -211,4 +220,14 @@ const FilesPage = () => { | |||
| ); | |||
| }; | |||
| FilesPage.propTypes = { | |||
| history: PropTypes.shape({ | |||
| replace: PropTypes.func, | |||
| push: PropTypes.func, | |||
| location: PropTypes.shape({ | |||
| pathname: PropTypes.string, | |||
| }), | |||
| }), | |||
| }; | |||
| export default FilesPage; | |||
| @@ -17,8 +17,10 @@ import Fade from "@mui/material/Fade"; | |||
| import { useTranslation } from "react-i18next"; | |||
| import searchImage from "../../assets/images/search.png"; | |||
| import IconButton from "../../components/IconButton/IconButton"; | |||
| import { FILES_PAGE } from "../../constants/pages"; | |||
| import PropTypes from "prop-types"; | |||
| const FilesViewPage = () => { | |||
| const FilesViewPage = ({history}) => { | |||
| const [toggleFiltersDrawer, setToggleFiltersDrawer] = useState(false); | |||
| const [page, setPage] = useState(1); | |||
| const { filters } = useSelector((s) => s.fileFilters); | |||
| @@ -97,8 +99,8 @@ const FilesViewPage = () => { | |||
| }; | |||
| const handleKeyDown = (event) => { | |||
| console.log(filters.content) | |||
| if (event.key === "Enter" && filters.content !== "" ) { | |||
| console.log(filters.content); | |||
| if (event.key === "Enter" && filters.content !== "") { | |||
| var catFilters = []; | |||
| filters.categories | |||
| ?.filter((n) => n.isChecked) | |||
| @@ -277,6 +279,12 @@ const FilesViewPage = () => { | |||
| shape="rounded" | |||
| page={page} | |||
| /> | |||
| <IconButton | |||
| className="c-btn ads-page-btn c-btn--primary add-ad-btn filesPage" | |||
| onClick={() => history.push(FILES_PAGE)} | |||
| > | |||
| + Fajl | |||
| </IconButton> | |||
| </div> | |||
| <div | |||
| style={{ | |||
| @@ -290,4 +298,14 @@ const FilesViewPage = () => { | |||
| ); | |||
| }; | |||
| FilesViewPage.propTypes = { | |||
| history: PropTypes.shape({ | |||
| replace: PropTypes.func, | |||
| push: PropTypes.func, | |||
| location: PropTypes.shape({ | |||
| pathname: PropTypes.string, | |||
| }), | |||
| }), | |||
| }; | |||
| export default FilesViewPage; | |||