diff --git a/src/actions/SuppliersActions.js b/src/actions/SuppliersActions.js
index af87be7a..8b83e7af 100644
--- a/src/actions/SuppliersActions.js
+++ b/src/actions/SuppliersActions.js
@@ -144,47 +144,6 @@ SuppliersActions.executePeliasTask = tasks => async (dispatch, getState) => {
});
};
-SuppliersActions.uploadFiles = (files, providerId) => async (
- dispatch,
- getState
-) => {
- dispatch(sendData(0, types.UPDATED_FILE_UPLOAD_PROGRESS));
-
- const url = `${window.config.timetableAdminBaseUrl}${providerId}/files`;
-
- var data = new FormData();
-
- files.forEach(file => {
- data.append('files', file);
- });
-
- var config = {
- onUploadProgress: function(progressEvent) {
- let percentCompleted = (progressEvent.loaded / progressEvent.total) * 100;
- dispatch(sendData(percentCompleted, types.UPDATED_FILE_UPLOAD_PROGRESS));
- },
- ...(await getApiConfig(getState().UserReducer.auth))
- };
-
- return axios
- .post(url, data, config)
- .then(function(response) {
- dispatch(SuppliersActions.addNotification('Uploaded file(s)', 'success'));
- dispatch(
- SuppliersActions.logEvent({
- title: 'Uploaded file(s): ' + files.join(',')
- })
- );
- dispatch(sendData(0, types.UPDATED_FILE_UPLOAD_PROGRESS));
- })
- .catch(function(response) {
- dispatch(
- SuppliersActions.addNotification('Unable to upload file(s)', 'error')
- );
- dispatch(sendData(0, types.UPDATED_FILE_UPLOAD_PROGRESS));
- });
-};
-
SuppliersActions.uploadTariffZonesFiles = (files, provider) => async (
dispatch,
getState
@@ -387,17 +346,11 @@ const getProviderPayload = data => {
referential: trimmedData._referential,
organisation: trimmedData._organisation,
user: trimmedData._user,
- dataFormat: trimmedData._dataFormat,
- enableValidation: trimmedData._enableValidation,
allowCreateMissingStopPlace: trimmedData._allowCreateMissingStopPlace,
- enableStopPlaceIdMapping: trimmedData._enableStopPlaceIdMapping,
- enableCleanImport: trimmedData._enableCleanImport,
generateDatedServiceJourneyIds:
trimmedData._generateDatedServiceJourneyIds,
generateMissingServiceLinksForModes:
trimmedData._generateMissingServiceLinksForModes,
- googleUpload: trimmedData._googleUpload,
- googleQAUpload: trimmedData._googleQAUpload,
migrateDataToProvider: trimmedData._migrateDataToProvider,
enableAutoImport: trimmedData._enableAutoImport,
enableAutoValidation: trimmedData._enableAutoValidation,
diff --git a/src/actions/actionTypes.js b/src/actions/actionTypes.js
index 7c2961eb..aa982c4b 100644
--- a/src/actions/actionTypes.js
+++ b/src/actions/actionTypes.js
@@ -166,7 +166,6 @@ export const ERRORS_SUPPLIERS = 'ERRORS_SUPPLIERS';
export const REQUESTED_ALL_SUPPLIERS_STATUS = 'REQUESTED_ALL_SUPPLIERS_STATUS';
export const RECEIVED_ALL_SUPPLIERS_STATUS = 'RECEIVED_ALL_SUPPLIERS_STATUS';
-export const UPDATED_FILE_UPLOAD_PROGRESS = 'UPDATED_FILE_UPLOAD_PROGRESS';
export const UPDATED_TARIFF_ZONE_FILE_UPLOAD_PROGRESS =
'UPDATED_TARIFF_ZONE_FILE_UPLOAD_PROGRESS';
diff --git a/src/modals/ModalEditProvider.js b/src/modals/ModalEditProvider.js
index 326c5857..b77db5b4 100644
--- a/src/modals/ModalEditProvider.js
+++ b/src/modals/ModalEditProvider.js
@@ -24,6 +24,15 @@ import FlatButton from 'material-ui/FlatButton';
import { connect } from 'react-redux';
import SuppliersActions from 'actions/SuppliersActions';
import TransportModesPopover from './TransportModesPopover';
+import { Tooltip } from '@material-ui/core';
+import HelpOutlineIcon from '@material-ui/icons/HelpOutline';
+import { withStyles } from '@material-ui/core/styles';
+
+const LightTooltip = withStyles(() => ({
+ tooltip: {
+ fontSize: 12
+ }
+}))(Tooltip);
const getEmptyForm = () => ({
_providerId: null,
@@ -34,15 +43,9 @@ const getEmptyForm = () => ({
_referential: '',
_organisation: '',
_user: '',
- _dataFormat: '',
- _enableValidation: false,
_allowCreateMissingStopPlace: false,
- _enableStopPlaceIdMapping: false,
- _enableCleanImport: false,
_generateDatedServiceJourneyIds: false,
_generateMissingServiceLinksForModes: [],
- _googleUpload: false,
- _googleQAUpload: false,
_migrateDataToProvider: null,
_enableAutoImport: false,
_enableAutoValidation: false,
@@ -86,15 +89,9 @@ class ModalEditProvider extends Component {
referential,
organisation,
user,
- dataFormat,
- enableValidation,
allowCreateMissingStopPlace,
- enableStopPlaceIdMapping,
- enableCleanImport,
generateDatedServiceJourneyIds,
generateMissingServiceLinksForModes,
- googleUpload,
- googleQAUpload,
migrateDataToProvider,
enableAutoImport,
enableAutoValidation,
@@ -109,15 +106,9 @@ class ModalEditProvider extends Component {
_referential: referential,
_organisation: organisation,
_user: user,
- _dataFormat: dataFormat,
- _enableValidation: enableValidation,
_allowCreateMissingStopPlace: allowCreateMissingStopPlace,
- _enableStopPlaceIdMapping: enableStopPlaceIdMapping,
- _enableCleanImport: enableCleanImport,
_generateDatedServiceJourneyIds: generateDatedServiceJourneyIds,
_generateMissingServiceLinksForModes: generateMissingServiceLinksForModes,
- _googleUpload: googleUpload,
- _googleQAUpload: googleQAUpload,
_migrateDataToProvider: migrateDataToProvider,
_enableAutoImport: enableAutoImport,
_enableAutoValidation: enableAutoValidation,
@@ -146,21 +137,6 @@ class ModalEditProvider extends Component {
return provider && provider.id && shouldUpdate;
}
- getDataFormats() {
- const formats = [
- { value: '', text: 'None' },
- { value: 'netexprofile', text: 'NeTEx Profile' },
- { value: 'gtfs', text: 'GTFS' }
- ];
- return formats.map(format => (
-
- ));
- }
-
handleCheckTransportMode(transportMode, isChecked) {
let transportModes = this.state.form._generateMissingServiceLinksForModes;
var idx = transportModes.indexOf(transportMode);
@@ -208,6 +184,16 @@ class ModalEditProvider extends Component {
}
}
+ toolTip(title) {
+ return (
+