Commit c97c9f7c authored by TJHeeringa's avatar TJHeeringa

Updated packages

parent 8514f5b9
NODE_PATH=src/
REACT_APP_API_URL='https://dev.sun.snt.utwente.nl'
REACT_APP_SERVER_URL='https://sun.snt.utwente.nl'
REACT_APP_PRODUCTION_ENV=false
\ No newline at end of file
NODE_PATH=src/
REACT_APP_API_URL='https://api.sun.utwente.nl'
REACT_APP_SERVER_URL='https://sun.utwente.nl'
REACT_APP_PRODUCTION_ENV=true
\ No newline at end of file
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"indent": [
"error",
"tab"
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/jsx-pascal-case": 1,
"import/no-unresolved": 2
}
}
\ No newline at end of file
14.8.0
\ No newline at end of file
{
"compilerOptions": {
"baseUrl": "src"
},
"include": ["src"]
}
\ No newline at end of file
This diff is collapsed.
......@@ -3,23 +3,22 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@date-io/date-fns": "^1.3.13",
"@date-io/moment": "^1.3.13",
"@devexpress/dx-react-core": "^2.6.4",
"@devexpress/dx-react-grid": "^2.6.4",
"@devexpress/dx-react-grid-export": "^2.6.4",
"@devexpress/dx-react-grid-material-ui": "^2.6.4",
"@fortawesome/fontawesome-svg-core": "^1.2.29",
"@fortawesome/free-solid-svg-icons": "^5.13.1",
"@date-io/moment": "^2.9.0",
"@devexpress/dx-react-core": "^2.7.1",
"@devexpress/dx-react-grid": "^2.7.1",
"@devexpress/dx-react-grid-export": "^2.7.1",
"@devexpress/dx-react-grid-material-ui": "^2.7.1",
"@fortawesome/fontawesome-svg-core": "^1.2.30",
"@fortawesome/free-solid-svg-icons": "^5.14.0",
"@fortawesome/react-fontawesome": "^0.1.11",
"@icon/open-iconic": "^1.1.4",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
"@material-ui/pickers": "^3.2.10",
"@mui-treasury/components": "^1.5.2",
"@mui-treasury/components": "^1.9.1",
"@mui-treasury/styling": "^0.2.8",
"availity-reactstrap-validation": "^2.6.1",
"bootstrap": "^4.5.0",
"bootstrap": "^4.5.2",
"bootstrap-switch-button-react": "^1.2.0",
"clsx": "^1.1.1",
"env-cmd": "^10.1.0",
......@@ -27,40 +26,40 @@
"i": "^0.3.6",
"jquery": "^3.5.1",
"json-loader": "^0.5.7",
"lodash": "^4.17.15",
"lodash": "^4.17.20",
"moment": "^2.27.0",
"node-sass": "^4.14.1",
"npm": "^6.14.5",
"npm": "^6.14.8",
"query-string": "^6.13.1",
"react": "^16.13.1",
"react-big-calendar": "^0.24.6",
"react-bootstrap": "^1.0.1",
"react-big-calendar": "^0.27.0",
"react-bootstrap": "^1.3.0",
"react-bootstrap-switch": "^15.5.3",
"react-cookie": "^3.1.2",
"react-country-region-selector": "^1.4.7",
"react-csv": "^1.1.2",
"react-csv": "^2.0.3",
"react-data-grid": "^5.0.5",
"react-datepicker": "^2.16.0",
"react-dom": "^16.13.1",
"react-icons": "^3.10.0",
"react-lorem-ipsum": "^1.4.4",
"react-material-ui-form-validator": "^2.0.10",
"react-icons": "^3.11.0",
"react-lorem-ipsum": "^1.4.5",
"react-material-ui-form-validator": "^2.1.1",
"react-modal": "^3.11.1",
"react-numeric-input": "^2.2.3",
"react-router-dom": "^5.2.0",
"react-router-tabs": "^1.3.2",
"react-scripts": "^2.1.8",
"react-scripts": "^3.4.3",
"react-search-input": "^0.11.3",
"react-simple-tree-menu": "^1.1.17",
"react-simple-tree-menu": "^1.1.18",
"react-sizeme": "^2.6.12",
"react-spinkit": "^3.0.0",
"react-strap": "0.0.1",
"react-table": "^6.11.5",
"reactstrap": "^8.5.1",
"restful-react": "^7.6.4",
"typescript": "^3.9.6",
"restful-react": "^14.4.0",
"typescript": "^3.9.7",
"universal-cookie": "^3.1.0",
"uuid": "^8.2.0"
"uuid": "^8.3.0"
},
"scripts": {
"start": "react-scripts start",
......@@ -81,6 +80,9 @@
],
"devDependencies": {
"babel-plugin-root-import": "^6.5.0",
"eslint": "^6.8.0",
"eslint-config-react-app": "^5.2.1",
"eslint-plugin-react": "^7.20.6",
"husky": "^4.2.5",
"react-image-webp": "^0.2.2"
},
......
......@@ -8,14 +8,10 @@ import Button from '@material-ui/core/Button';
import TextInfoContent from '@mui-treasury/components/content/textInfo';
import { useBlogTextInfoContentStyles } from '@mui-treasury/styles/textInfoContent/blog';
import { useOverShadowStyles } from '@mui-treasury/styles/shadow/over';
import PeopleCardFooter from '@mui-treasury/components/cardFooter/people';
import Box from '@material-ui/core/Box';
import PropTypes from "prop-types";
import Divider from '@material-ui/core/Divider';
import { loremIpsum } from 'react-lorem-ipsum';
import { Link } from "react-router-dom";
// import { useHistory } from "react-router-dom";
import { useHistory } from "react-router";
import { useHistory } from "react-router-dom";
const useStyles = makeStyles(theme => ({
......
......@@ -87,9 +87,6 @@ const ExtremeTable = (props) => {
// ****** States ******
// If there is no external selection state, create a local one
if (setSelection === undefined){
const [selection, setSelection] = useState([]);
}
const [pageSize, setPageSize] = useState(10);
const [currentPage, setCurrentPage] = useState(0);
const [sorting, setSorting] = useState(defaultSorting);
......@@ -418,7 +415,7 @@ ExtremeTable.propTypes = {
selection: PropTypes.exact({
selection: PropTypes.arrayOf(PropTypes.number),
setSelection: PropTypes.func
})
}).isRequired
};
ExtremeTable.defaultProps = {
......@@ -439,7 +436,7 @@ ExtremeTable.defaultProps = {
dateColumns: [],
numberColumns: [],
rowSelectionEnabledFilter: (row, selection) => true,
selection: {selection: undefined, setSelection: undefined}
selection: {selection: [], setSelection: ()=>{}}
};
export default ExtremeTable;
......
import React, { Component } from 'react'
import React, {Component, useState} from 'react'
import 'react-table/react-table.css'
import { Helper } from "App/Helper";
import { AlertHandlerContext } from "../../Contexts/AlertHandler";
......@@ -10,16 +10,19 @@ const MemberTable = props => {
const extremeHeaders = headers.map(header=>{return {"name": header.name, "title": header.title} });
const [selection, setSelection] = useState([]);
return (
<div className="MemberGrid">
<ExtremeTable
{...props}
selection={{selection: selection, setSelection: setSelection}}
rows={rows}
headers={extremeHeaders}
showExporter={true}
showEditing={true}
editingStateColumnExtensions={editingStateColumnExtensions}
choiceSelectionOptions={choiceSelectionOptions}
{...props}
/>
</div>
);
......
import React from "react";
import React, {useState} from "react";
import { makeStyles } from '@material-ui/core/styles';
import PropTypes from "prop-types";
import SimpleTable from "App/Components/Tables/SimpleTable"
import ExtremeTable from "App/Components/Tables/ExtremeTable"
import { zipObject, snakeCase } from 'lodash';
import { snakeCase } from 'lodash';
import CardGrid from "../../Components/Card/CardGrid";
......@@ -18,6 +17,8 @@ const DebtCollectionDetail = ({debtCollection, ...props}) => {
const extremeHeaders = headers.map(header=>{return {name: snakeCase(header), title: header}});
const [selection, setSelection] = useState([]);
return (
<ExtremeTable
headers={extremeHeaders}
......@@ -25,6 +26,7 @@ const DebtCollectionDetail = ({debtCollection, ...props}) => {
showExporter={true}
showGrouping={false}
showSelect={false}
selection={{selection: selection, setSelection: setSelection}}
{...props}
/>
)
......
......@@ -12,8 +12,7 @@ import CalendarToday from '@material-ui/icons/CalendarToday';
import { KeyboardDateTimePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
import MomentUtils from '@date-io/moment';
import moment from 'moment';
import { v4 as uuidv4 } from 'uuid';
import {useGet} from "restful-react/lib";
import { useGet } from "restful-react";
import { Helper } from "App/Helper";
import { useAlertHandler } from "App/Contexts/AlertHandler";
import Button from '@material-ui/core/Button';
......
import React, { Component } from 'react';
import { MemberGrid } from 'App/Components/Member/MemberGrid';
import MemberTable from 'App/Components/Tables/MemberTable';
import { Helper } from "App/Helper";
import { withStyles } from "@material-ui/core";
......@@ -53,7 +52,7 @@ class MembersCurrent extends Component {
let members_current = data.results;
this.setState({members_current: members_current})
});
}
};
morphDataToMemberGridProfiles = () => {
return this.state.members_current.map(membership => {
......
......@@ -33,7 +33,7 @@ export class MembershipRequest extends Component {
console.log(data_fields_values);
console.log(association_data);
return Helper.api_call(process.env.REACT_APP_API_URL + '/memberships', "POST",
{"status": 'Pending', "profile": profile.url, "association": association.url, "type": type, specific_data: association_data}, 'json',
{"profile": profile.url, "association": association.url, "type": type, specific_data: association_data}, 'json',
()=>{this.context.handleAlertHandler('green', 'Membership request sent')},
()=>{this.context.handleAlertHandler('red', 'Something went wrong sending your membership request')}
)
......
......@@ -56,7 +56,12 @@ class Login extends Component {
<div className='login-form'>
<div className="Login">
<AvForm id="loginform" onValidSubmit={this.handleValidSubmit} ref={c => (this.form = c)}>
<a className="utwenteloginbutton btn btn-outline-secondary btn-block" href={process.env.REACT_APP_API_URL + "/oidc/authenticate/?next=" + process.env.REACT_APP_SERVER_URL + "/oidc"}>Login with University Account</a>
<a
className="utwenteloginbutton btn btn-outline-secondary btn-block"
href={process.env.REACT_APP_API_URL + "/oidc/authenticate/?next=" + window.location.origin + "/oidc"}
>
Login with University Account
</a>
<p className="divider">or</p>
<div className="loginfields">
<AvField
......
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