| .candidates-pagination { | .candidates-pagination { | ||||
| margin-top: 20px; | margin-top: 20px; | ||||
| margin-left: 350px; | |||||
| align-self: center; | |||||
| padding-bottom: 20px; | padding-bottom: 20px; | ||||
| } | } | ||||
| .files-page-card-add-button { | .files-page-card-add-button { | ||||
| padding-bottom: 36px; | padding-bottom: 36px; | ||||
| display: flex; | display: flex; | ||||
| justify-content: flex-end; | |||||
| justify-content: space-between; | |||||
| } | } | ||||
| .files-page-drag-and-drop { | .files-page-drag-and-drop { | ||||
| .search-field{ | .search-field{ | ||||
| margin-right: 30px; | margin-right: 30px; | ||||
| margin-left: 0px; | margin-left: 0px; | ||||
| } | |||||
| .filesPage{ | |||||
| align-self: flex-end; | |||||
| } | } |
| } | } | ||||
| } | } | ||||
| .table-cont { | .table-cont { | ||||
| display: flex; | |||||
| flex-direction: column; | |||||
| @include media-below($bp-xl) { | @include media-below($bp-xl) { | ||||
| overflow-x: auto !important; | overflow-x: auto !important; | ||||
| } | } |
| const NavbarComponent = () => { | const NavbarComponent = () => { | ||||
| const navItems = [ | const navItems = [ | ||||
| "users", | "users", | ||||
| "files", | |||||
| "filesView", | "filesView", | ||||
| // "signOut" | // "signOut" | ||||
| ]; | ]; |
| } from "../../store/actions/tags/tagsAction"; | } from "../../store/actions/tags/tagsAction"; | ||||
| import { selectTags } from "../../store/selectors/tagsSelector"; | import { selectTags } from "../../store/selectors/tagsSelector"; | ||||
| import { uploadFileReq } from "../../store/actions/uploadFile/uploadFileActions"; | 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 [dropzoneActive, setDropzoneActive] = useState(false); | ||||
| const [pdfFile, setPdfFile] = useState(null); | const [pdfFile, setPdfFile] = useState(null); | ||||
| const [title, setTitle] = useState(""); | const [title, setTitle] = useState(""); | ||||
| const onSuccessUploadFile = () => { | const onSuccessUploadFile = () => { | ||||
| dispatch(resetIsCheckedTagsValue()); | dispatch(resetIsCheckedTagsValue()); | ||||
| setPdfFile(null); | setPdfFile(null); | ||||
| setTitle("") | |||||
| }; | }; | ||||
| const handleDrop = (e) => { | const handleDrop = (e) => { | ||||
| </div> | </div> | ||||
| <div className="files-page-card"> | <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 | <IconButton | ||||
| className="c-btn ads-page-btn c-btn--primary add-ad-btn" | className="c-btn ads-page-btn c-btn--primary add-ad-btn" | ||||
| onClick={uploadFileHandler} | onClick={uploadFileHandler} | ||||
| ); | ); | ||||
| }; | }; | ||||
| FilesPage.propTypes = { | |||||
| history: PropTypes.shape({ | |||||
| replace: PropTypes.func, | |||||
| push: PropTypes.func, | |||||
| location: PropTypes.shape({ | |||||
| pathname: PropTypes.string, | |||||
| }), | |||||
| }), | |||||
| }; | |||||
| export default FilesPage; | export default FilesPage; |
| import { useTranslation } from "react-i18next"; | import { useTranslation } from "react-i18next"; | ||||
| import searchImage from "../../assets/images/search.png"; | import searchImage from "../../assets/images/search.png"; | ||||
| import IconButton from "../../components/IconButton/IconButton"; | 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 [toggleFiltersDrawer, setToggleFiltersDrawer] = useState(false); | ||||
| const [page, setPage] = useState(1); | const [page, setPage] = useState(1); | ||||
| const { filters } = useSelector((s) => s.fileFilters); | const { filters } = useSelector((s) => s.fileFilters); | ||||
| }; | }; | ||||
| const handleKeyDown = (event) => { | 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 = []; | var catFilters = []; | ||||
| filters.categories | filters.categories | ||||
| ?.filter((n) => n.isChecked) | ?.filter((n) => n.isChecked) | ||||
| shape="rounded" | shape="rounded" | ||||
| page={page} | 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> | ||||
| <div | <div | ||||
| style={{ | style={{ | ||||
| ); | ); | ||||
| }; | }; | ||||
| FilesViewPage.propTypes = { | |||||
| history: PropTypes.shape({ | |||||
| replace: PropTypes.func, | |||||
| push: PropTypes.func, | |||||
| location: PropTypes.shape({ | |||||
| pathname: PropTypes.string, | |||||
| }), | |||||
| }), | |||||
| }; | |||||
| export default FilesViewPage; | export default FilesViewPage; |