Commit ebe42bc4 authored by Florent Chehab's avatar Florent Chehab
Browse files

Finish reorganizing frontend and imports are finally linted ! youpiiiii

parent 81f10fe3
Pipeline #35760 passed with stages
......@@ -6,7 +6,7 @@ import MenuItem from "@material-ui/core/MenuItem";
import Select from "@material-ui/core/Select";
import Field from "./Field";
import CustomError from "../../../../utils/CustomError";
import CustomError from "../../common/CustomError";
import withStyles from "@material-ui/core/styles/withStyles";
......
......@@ -5,9 +5,9 @@ import MuiTextField from "@material-ui/core/TextField";
import Typography from "@material-ui/core/Typography";
import Field from "./Field";
import isUrl from "../../../../utils/isUrl";
import stringHasExtension from "../../../../utils/stringHasExtension";
import CustomError from "../../../../utils/CustomError";
import isUrl from "../../../utils/isUrl";
import stringHasExtension from "../../../utils/stringHasExtension";
import CustomError from "../../common/CustomError";
class TextField extends Field {
......
......@@ -15,8 +15,8 @@ import KeyboardArrowUpIcon from "@material-ui/icons/KeyboardArrowUp";
import Field from "./Field";
import Typography from "@material-ui/core/Typography";
import isUrl from "../../../../utils/isUrl";
import CustomError from "../../../../utils/CustomError";
import isUrl from "../../../utils/isUrl";
import CustomError from "../../common/CustomError";
......
......@@ -8,8 +8,8 @@ import TextField from "./fields/TextField";
import MultiSelectField from "./fields/MultiSelectField";
import NumberField from "./fields/NumberField";
import store from "../../store/index";
import { getLatestRead } from "../../api/utils";
import store from "../../redux/store";
import { getLatestRead } from "../../redux/api/utils";
export default {
/**
......
......@@ -4,9 +4,9 @@ import { connect } from "react-redux";
import { Marker, Popup } from "react-leaflet";
import UnivPopupContent from "./UnivPopupContent";
import getActions from "../../api/getActions";
import getActions from "../../redux/api/getActions";
import CustomComponentForAPI from "../CustomComponentForAPI";
import CustomComponentForAPI from "../common/CustomComponentForAPI";
import arrayOfInstancesToMap from "../../utils/arrayOfInstancesToMap";
......
......@@ -5,7 +5,7 @@ import PropTypes from "prop-types";
import { Map, TileLayer, LayersControl, LayerGroup } from "react-leaflet";
import UnivMarkers from "./UnivMakers";
import { saveMainMapStatus } from "../../actions/map";
import { saveMainMapStatus } from "../../redux/actions/map";
/**
......
......@@ -3,7 +3,7 @@ import PropTypes from "prop-types";
import withStyles from "@material-ui/core/styles/withStyles";
import Typography from "@material-ui/core/Typography";
import Paper from "@material-ui/core/Paper";
import Markdown from "../shared/Markdown";
import Markdown from "../common/Markdown";
const source = `
......
......@@ -2,7 +2,7 @@ import React from "react";
import PropTypes from "prop-types";
import Typography from "@material-ui/core/Typography";
import Paper from "@material-ui/core/Paper";
import CustomComponentForAPI from "../CustomComponentForAPI";
import CustomComponentForAPI from "../common/CustomComponentForAPI";
import { connect } from "react-redux";
import Dialog from "@material-ui/core/Dialog";
import DialogActions from "@material-ui/core/DialogActions";
......@@ -10,18 +10,18 @@ import DialogTitle from "@material-ui/core/DialogTitle";
import Button from "@material-ui/core/Button";
import UniversityTemplate from "../university/UniversityTemplate";
import UnivInfoProvider from "../university/shared/UnivInfoProvider";
import UnivInfoProvider from "../university/common/UnivInfoProvider";
import {
NavLink,
Redirect
} from "react-router-dom";
import getActions from "../../api/getActions";
import getActions from "../../redux/api/getActions";
import {
saveUniversityBeingViewed
} from "../../actions/universityPage";
} from "../../redux/actions/universityPage";
......
......@@ -3,14 +3,14 @@ import PropTypes from "prop-types";
import TextField from "@material-ui/core/TextField";
import CustomComponentForAPI from "../CustomComponentForAPI";
import CustomComponentForAPI from "../common/CustomComponentForAPI";
import { connect } from "react-redux";
import fuzzysort from "fuzzysort";
import UnivList from "./UnivList";
import withStyles from "@material-ui/core/styles/withStyles";
import getActions from "../../api/getActions";
import getActions from "../../redux/api/getActions";
/**
......
......@@ -40,12 +40,12 @@ import MuiThemeProvider from "@material-ui/core/styles/MuiThemeProvider";
import areSameThemes from "../../utils/areSameThemes";
import CustomComponentForAPI from "../CustomComponentForAPI";
import CustomComponentForAPI from "../common/CustomComponentForAPI";
import { saveAppTheme, saveAppColorPicker } from "../../actions/theme";
import { saveAppTheme, saveAppColorPicker } from "../../redux/actions/theme";
import getActions from "../../api/getActions";
import getActions from "../../redux/api/getActions";
const HUES = Object.keys(colors).slice(1, 17);
const SHADES = [900, 800, 700, 600, 500, 400, 300, 200, 100, 50, "A700", "A400", "A200", "A100"];
......
......@@ -15,7 +15,7 @@ import HistoryIcon from "@material-ui/icons/History";
import MoreHorizIcon from "@material-ui/icons/MoreHoriz";
import Typography from "@material-ui/core/Typography";
import CoverGallery from "./CoverGallery";
import CoverGallery from "./otherComponents/CoverGallery";
import GeneralInfoTab from "./tabs/GeneralInfoTab";
// import UniversityMoreTab from "./tabs/UniversityMoreTab";
......@@ -24,7 +24,7 @@ import GeneralInfoTab from "./tabs/GeneralInfoTab";
import ScholarshipsTab from "./tabs/ScholarshipsTab";
// import MoreTab from "./tabs/MoreTab";
import VisibilityContext from "../shared/VisibilityContext";
import VisibilityContext from "../common/VisibilityContext";
/**
* Component that provides information related to if the tab is selected / visible or not
......
import React from "react";
import PropTypes from "prop-types";
import __pick from "lodash/pick";
import UnivContext from "../../shared/UnivContext";
import UnivContext from "./UnivContext";
//import VisibilityContext from "../../shared/VisibilityContext";
class UnivInfoConsumer extends React.PureComponent {
......
......@@ -2,11 +2,11 @@ import React from "react";
import PropTypes from "prop-types";
import compose from "recompose/compose";
import { connect } from "react-redux";
import UnivContext from "../../shared/UnivContext";
import UnivContext from "../common/UnivContext";
import CustomComponentForAPI from "../../CustomComponentForAPI";
import CustomComponentForAPI from "../../common/CustomComponentForAPI";
import getActions from "../../../api/getActions";
import getActions from "../../../redux/api/getActions";
......
......@@ -4,12 +4,12 @@ import withStyles from "@material-ui/core/styles/withStyles";
import compose from "recompose/compose";
import { connect } from "react-redux";
import Editor from "../shared/Editor";
import Form from "../shared/Form";
import editorStyle from "../shared/editorStyle";
import Editor from "./common/Editor";
import Form from "../../form/Form";
import editorStyle from "./common/editorStyle";
import getMapStateToPropsForEditor from "../shared/editorFunctions/getMapStateToPropsForEditor";
import getMapDispatchToPropsForEditor from "../shared/editorFunctions/getMapDispatchToPropsForEditor";
import getMapStateToPropsForEditor from "./common/getMapStateToPropsForEditor";
import getMapDispatchToPropsForEditor from "./common/getMapDispatchToPropsForEditor";
import { withSnackbar } from "notistack";
......
......@@ -4,13 +4,12 @@ import withStyles from "@material-ui/core/styles/withStyles";
import compose from "recompose/compose";
import { connect } from "react-redux";
import Editor from "../shared/Editor";
import ScholarshipForm from "../shared/ScholarshipForm";
import editorStyle from "../shared/editorStyle";
import ScholarshipForm from "./common/ScholarshipForm";
import Editor from "./common/Editor";
import editorStyle from "./common/editorStyle";
import getMapStateToPropsForEditor from "../shared/editorFunctions/getMapStateToPropsForEditor";
import getMapDispatchToPropsForEditor from "../shared/editorFunctions/getMapDispatchToPropsForEditor";
import getMapStateToPropsForEditor from "./common/getMapStateToPropsForEditor";
import getMapDispatchToPropsForEditor from "./common/getMapDispatchToPropsForEditor";
import { withSnackbar } from "notistack";
......
......@@ -4,12 +4,12 @@ import withStyles from "@material-ui/core/styles/withStyles";
import compose from "recompose/compose";
import { connect } from "react-redux";
import Editor from "../shared/Editor";
import Form from "../shared/Form";
import editorStyle from "../shared/editorStyle";
import Editor from "./common/Editor";
import Form from "../../form/Form";
import editorStyle from "./common/editorStyle";
import getMapStateToPropsForEditor from "../shared/editorFunctions/getMapStateToPropsForEditor";
import getMapDispatchToPropsForEditor from "../shared/editorFunctions/getMapDispatchToPropsForEditor";
import getMapStateToPropsForEditor from "./common/getMapStateToPropsForEditor";
import getMapDispatchToPropsForEditor from "./common/getMapDispatchToPropsForEditor";
import { withSnackbar } from "notistack";
const styles = theme => ({
......
......@@ -3,16 +3,16 @@ import withStyles from "@material-ui/core/styles/withStyles";
import compose from "recompose/compose";
import { connect } from "react-redux";
import Editor from "../shared/Editor";
import Form from "../shared/Form";
import editorStyle from "../shared/editorStyle";
import TextField from "../shared/fields/TextField";
import Editor from "./common/Editor";
import Form from "../../form/Form";
import editorStyle from "./common/editorStyle";
import getMapStateToPropsForEditor from "../shared/editorFunctions/getMapStateToPropsForEditor";
import getMapDispatchToPropsForEditor from "../shared/editorFunctions/getMapDispatchToPropsForEditor";
import getMapStateToPropsForEditor from "./common/getMapStateToPropsForEditor";
import getMapDispatchToPropsForEditor from "./common/getMapDispatchToPropsForEditor";
import { withSnackbar } from "notistack";
import TextField from "../../form/fields/TextField";
const styles = theme => ({
...editorStyle(theme)
});
......
......@@ -3,14 +3,13 @@ import PropTypes from "prop-types";
import withStyles from "@material-ui/core/styles/withStyles";
import compose from "recompose/compose";
import { connect } from "react-redux";
import ScholarshipForm from "./common/ScholarshipForm";
import Editor from "../shared/Editor";
import ScholarshipForm from "../shared/ScholarshipForm";
import editorStyle from "../shared/editorStyle";
import Editor from "./common/Editor";
import editorStyle from "./common/editorStyle";
import getMapStateToPropsForEditor from "../shared/editorFunctions/getMapStateToPropsForEditor";
import getMapDispatchToPropsForEditor from "../shared/editorFunctions/getMapDispatchToPropsForEditor";
import getMapStateToPropsForEditor from "./common/getMapStateToPropsForEditor";
import getMapDispatchToPropsForEditor from "./common/getMapDispatchToPropsForEditor";
import { withSnackbar } from "notistack";
const styles = theme => ({
......
import React from "react";
import PropTypes from "prop-types";
import withStyles from "@material-ui/core/styles/withStyles";
import compose from "recompose/compose";
import { connect } from "react-redux";
import Editor from "../shared/Editor";
import editorStyle from "../shared/editorStyle";
import DateField from "../shared/fields/DateField";
import dateStrToDate from "../../../utils/dateStrToDate";
import getMapStateToPropsForEditor from "../shared/editorFunctions/getMapStateToPropsForEditor";
import getMapDispatchToPropsForEditor from "../shared/editorFunctions/getMapDispatchToPropsForEditor";
import DateField from "../../form/fields/DateField";
import Editor from "./common/Editor";
import Form from "../../form/Form";
import editorStyle from "./common/editorStyle";
import getMapStateToPropsForEditor from "./common/getMapStateToPropsForEditor";
import getMapDispatchToPropsForEditor from "./common/getMapDispatchToPropsForEditor";
import CustomError from "../../common/CustomError";
import Form from "../shared/Form";
import { withSnackbar } from "notistack";
import CustomError from "../../../utils/CustomError";
const styles = theme => ({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment