Commit 0e4c1aef authored by Florent Chehab's avatar Florent Chehab Committed by Florent Chehab
Browse files

removed(all TODOs):

Some of them were simply removed, oter were fixed.
From now on, the use of TODO is not permitted in the code.
parent 5530363c
Pipeline #36624 passed with stages
in 4 minutes and 54 seconds
...@@ -18,7 +18,7 @@ const styles = theme => ({ ...@@ -18,7 +18,7 @@ const styles = theme => ({
}); });
function renderCore(rawModelData, classes, outsideData) { function renderCore(rawModelData, classes, outsideData) {
const { comment, frequency, currency, type } = rawModelData, const { comment, frequency, currency, short_description } = rawModelData,
amountMin = rawModelData.amount_min, amountMin = rawModelData.amount_min,
amountMax = rawModelData.amount_max, amountMax = rawModelData.amount_max,
otherAdvantages = rawModelData.other_advantages; otherAdvantages = rawModelData.other_advantages;
...@@ -28,7 +28,7 @@ function renderCore(rawModelData, classes, outsideData) { ...@@ -28,7 +28,7 @@ function renderCore(rawModelData, classes, outsideData) {
currency={currency} currency={currency}
currencies={outsideData.currencies} currencies={outsideData.currencies}
frequency={frequency} frequency={frequency}
type={type} shortDescription={short_description}
amountMin={amountMin} amountMin={amountMin}
amountMax={amountMax} amountMax={amountMax}
otherAdvantages={otherAdvantages} otherAdvantages={otherAdvantages}
......
...@@ -128,11 +128,11 @@ class Scholarship extends React.Component { ...@@ -128,11 +128,11 @@ class Scholarship extends React.Component {
} }
render() { render() {
const { type, comment, classes, theme } = this.props; const { shortDescription, comment, classes, theme } = this.props;
return ( return (
<> <>
<Typography className={classes.item} variant='h5'>{type}</Typography> <Typography className={classes.item} variant='h5'>{shortDescription}</Typography>
{this.renderFinancialAdvantage()} {this.renderFinancialAdvantage()}
<div style={{ height: 2 * theme.spacing.unit }} /> <div style={{ height: 2 * theme.spacing.unit }} />
{this.renderOtherAdvantages()} {this.renderOtherAdvantages()}
...@@ -148,7 +148,7 @@ Scholarship.propTypes = { ...@@ -148,7 +148,7 @@ Scholarship.propTypes = {
theme: PropTypes.object.isRequired, theme: PropTypes.object.isRequired,
currency: PropTypes.string.isRequired, currency: PropTypes.string.isRequired,
frequency: PropTypes.string, frequency: PropTypes.string,
type: PropTypes.string.isRequired, shortDescription: PropTypes.string.isRequired,
comment: PropTypes.string.isRequired, comment: PropTypes.string.isRequired,
otherAdvantages: PropTypes.string, otherAdvantages: PropTypes.string,
amountMin: PropTypes.string, amountMin: PropTypes.string,
......
...@@ -4,7 +4,6 @@ import styles from "./CoverGallery.scss"; ...@@ -4,7 +4,6 @@ import styles from "./CoverGallery.scss";
/** /**
* Component to display a cover image gallery with custom styling done in the ./CoverGallery.scss file * Component to display a cover image gallery with custom styling done in the ./CoverGallery.scss file
* TODO add children customization
* *
* @class CoverGallery * @class CoverGallery
* @extends {React.Component} * @extends {React.Component}
......
...@@ -110,7 +110,7 @@ class GeneralInfoTab extends Component { ...@@ -110,7 +110,7 @@ class GeneralInfoTab extends Component {
GeneralInfoTab.propTypes = { GeneralInfoTab.propTypes = {
classes: PropTypes.object.isRequired, classes: PropTypes.object.isRequired,
theme: PropTypes.object.isRequired, theme: PropTypes.object.isRequired,
width: PropTypes.any // TODO better width: PropTypes.string.isRequired
}; };
const styles = { const styles = {
......
/*
* This file contains the redux actions related to the search component
* TODO: check what is done in this file, seem not to be super coherent and a mix with filter
*/
// import {
// SAVE_SELECTED_UNIVERSITIES,
// SAVE_FILTER_CONFIG
// } from "./action-types";
// /**
// * Action: to save the selected university
// *
// * @export
// * @param {array} newSelection
// * @returns {object}
// */
// export function saveSelectedUniversities(newSelection) {
// return {
// type: SAVE_SELECTED_UNIVERSITIES,
// newSelection
// };
// }
// /**
// * Action: to save the filter config
// *
// * @export
// * @param {array} config
// * @returns {object}
// */
// export function saveFilterConfig(config) {
// return {
// type: SAVE_FILTER_CONFIG,
// config
// };
// }
...@@ -6,8 +6,6 @@ import SmartActions from "./SmartActions"; ...@@ -6,8 +6,6 @@ import SmartActions from "./SmartActions";
import getCrudActionTypes from "./getCrudActionTypes"; import getCrudActionTypes from "./getCrudActionTypes";
// TODO : Lacks delete actions
// Read generic functions // Read generic functions
function _isReading(status, type) { function _isReading(status, type) {
return { return {
......
...@@ -21,14 +21,12 @@ function addAPIs(arr) { ...@@ -21,14 +21,12 @@ function addAPIs(arr) {
.filter(info => info.requires_testing !== true) .filter(info => info.requires_testing !== true)
.forEach(info => { .forEach(info => {
// TODO better generality with /api add to a shared parameter file let apiEndPoint = `/api/${info.api_end_point}/`,
let apiEndPoint = `/api/${info.api_end_point}/`; apiInfo = {
name: info.api_end_point,
let apiInfo = { readOnly: info.read_only,
name: info.api_end_point, apiEndPoint
readOnly: info.read_only, };
apiEndPoint
};
const actions = new CrudActions(apiInfo); const actions = new CrudActions(apiInfo);
apiActionsTmp[apiInfo.name] = actions; apiActionsTmp[apiInfo.name] = actions;
......
/*
* This file contains the redux reducers related to the search component
* TODO: check what is done in this file, seem not to be super coherent and a mix with filter
*/
// import { SAVE_SELECTED_UNIVERSITIES, SAVE_FILTER_CONFIG } from "../actions/action-types";
// /**
// * Reducer: save the selected universities
// *
// * @export
// * @param {array} [state=[]]
// * @param {string} action
// * @returns
// */
// export function saveSelectedUniversities(state = [], action) {
// switch (action.type) {
// case SAVE_SELECTED_UNIVERSITIES:
// return {
// selection: action.newSelection,
// };
// default:
// return state;
// }
// }
// export function saveFilterConfig(state = { countriesFilter: { selectedItems: [], inputValue: "" } }, action) {
// switch (action.type) {
// case SAVE_FILTER_CONFIG:
// return Object.assign({}, state, action.config);
// default:
// return state;
// }
// }
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