Commit 11671c76 authored by TJHeeringa's avatar TJHeeringa

fixed various errors, Closes #67,#63

parent dd4b1011
......@@ -1017,19 +1017,20 @@
"resolved": "https://registry.npmjs.org/@date-io/core/-/core-1.3.13.tgz",
"integrity": "sha512-AlEKV7TxjeK+jxWVKcCFrfYAk8spX9aCyiToFIiLPtfQbsjmRGLIhb5VZgptQcJdHtLXo7+m0DuurwFgUToQuA=="
},
"@date-io/date-fns": {
"version": "1.3.13",
"resolved": "https://registry.npmjs.org/@date-io/date-fns/-/date-fns-1.3.13.tgz",
"integrity": "sha512-yXxGzcRUPcogiMj58wVgFjc9qUYrCnnU9eLcyNbsQCmae4jPuZCDoIBR21j8ZURsM7GRtU62VOw5yNd4dDHunA==",
"requires": {
"@date-io/core": "^1.3.13"
}
},
"@date-io/moment": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/@date-io/moment/-/moment-2.4.0.tgz",
"integrity": "sha512-857C9idmZGpD8NygxQsOXPa3OePC6UFAhU996dCUv8cY17p1tkjgj7/JZ3J7PTV2i8ybeUDUD/tAadACEtI05g==",
"version": "1.3.13",
"resolved": "https://registry.npmjs.org/@date-io/moment/-/moment-1.3.13.tgz",
"integrity": "sha512-3kJYusJtQuOIxq6byZlzAHoW/18iExJer9qfRF5DyyzdAk074seTuJfdofjz4RFfTd/Idk8WylOQpWtERqvFuQ==",
"requires": {
"@date-io/core": "^2.4.0"
},
"dependencies": {
"@date-io/core": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/@date-io/core/-/core-2.4.0.tgz",
"integrity": "sha512-XUr4TSwFmthcCn5QYnGqobbnBqOsSyCggRfvieMQHPSz5zei8KYpw4xlvFFQfu/MI3CmCHDjWMkVaPy/uFIDNA=="
}
"@date-io/core": "^1.3.13"
}
},
"@devexpress/dx-core": {
......@@ -1666,9 +1667,9 @@
}
},
"acorn": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz",
"integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw=="
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz",
"integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA=="
},
"acorn-dynamic-import": {
"version": "3.0.0",
......@@ -9068,6 +9069,11 @@
"resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz",
"integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc="
},
"infer-owner": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz",
"integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A=="
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
......@@ -11628,9 +11634,9 @@
}
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
},
"mississippi": {
"version": "3.0.0",
......@@ -21811,6 +21817,26 @@
"requires": {
"path-parse": "^1.0.6"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
"terser-webpack-plugin": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.2.tgz",
"integrity": "sha512-1DMkTk286BzmfylAvLXwpJrI7dWa5BnFmscV/2dCr8+c56egFcbaeFAl7+sujAjdmpLam21XRdhA4oifLyiWWg==",
"requires": {
"cacache": "^11.0.2",
"find-cache-dir": "^2.0.0",
"schema-utils": "^1.0.0",
"serialize-javascript": "^1.4.0",
"source-map": "^0.6.1",
"terser": "^3.16.1",
"webpack-sources": "^1.1.0",
"worker-farm": "^1.5.2"
}
}
}
},
......@@ -24383,24 +24409,94 @@
}
},
"terser-webpack-plugin": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.2.tgz",
"integrity": "sha512-1DMkTk286BzmfylAvLXwpJrI7dWa5BnFmscV/2dCr8+c56egFcbaeFAl7+sujAjdmpLam21XRdhA4oifLyiWWg==",
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz",
"integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==",
"requires": {
"cacache": "^11.0.2",
"find-cache-dir": "^2.0.0",
"cacache": "^12.0.2",
"find-cache-dir": "^2.1.0",
"is-wsl": "^1.1.0",
"schema-utils": "^1.0.0",
"serialize-javascript": "^1.4.0",
"serialize-javascript": "^2.1.2",
"source-map": "^0.6.1",
"terser": "^3.16.1",
"webpack-sources": "^1.1.0",
"worker-farm": "^1.5.2"
"terser": "^4.1.2",
"webpack-sources": "^1.4.0",
"worker-farm": "^1.7.0"
},
"dependencies": {
"cacache": {
"version": "12.0.3",
"resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz",
"integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==",
"requires": {
"bluebird": "^3.5.5",
"chownr": "^1.1.1",
"figgy-pudding": "^3.5.1",
"glob": "^7.1.4",
"graceful-fs": "^4.1.15",
"infer-owner": "^1.0.3",
"lru-cache": "^5.1.1",
"mississippi": "^3.0.0",
"mkdirp": "^0.5.1",
"move-concurrently": "^1.0.1",
"promise-inflight": "^1.0.1",
"rimraf": "^2.6.3",
"ssri": "^6.0.1",
"unique-filename": "^1.1.1",
"y18n": "^4.0.0"
}
},
"commander": {
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
},
"lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
"integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
"requires": {
"yallist": "^3.0.2"
}
},
"serialize-javascript": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz",
"integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ=="
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
"source-map-support": {
"version": "0.5.16",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz",
"integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==",
"requires": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"
}
},
"terser": {
"version": "4.6.7",
"resolved": "https://registry.npmjs.org/terser/-/terser-4.6.7.tgz",
"integrity": "sha512-fmr7M1f7DBly5cX2+rFDvmGBAaaZyPrHYK4mMdHEDAdNTqXSZgSOfqsfGq2HqPGT/1V0foZZuCZFx8CHKgAk3g==",
"requires": {
"commander": "^2.20.0",
"source-map": "~0.6.1",
"source-map-support": "~0.5.12"
}
},
"y18n": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
},
"yallist": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
}
}
},
......@@ -41,7 +41,7 @@ export default function DrawerList(props) {
className={classes.root}
>
{props.items && props.items.map((item, id)=>
(item.items && item.items.length > 0) ? <DrawerListItemDropdown depth={depth} {...item} /> : <DrawerListItemLink depth={depth} {...item} />
(item.items && item.items.length > 0) ? <DrawerListItemDropdown key={'drawer_d'+depth+"_id"+id} depth={depth} {...item} /> : <DrawerListItemLink key={'drawer_d'+depth+"_id"+id} depth={depth} {...item} />
)}
</List>
);
......@@ -63,7 +63,7 @@ function DrawerListItemDropdown(props) {
</ListItem>
<Collapse in={open} timeout="auto" unmountOnExit>
{props.items.map((item, id)=>
(item.items && item.items.length > 0) ? <DrawerListItemDropdown depth={props.depth+1} {...item} /> : <DrawerListItemLink depth={props.depth+1} {...item} />
(item.items && item.items.length > 0) ? <DrawerListItemDropdown key={'drawer_d'+props.depth+"_id"+id} depth={props.depth+1} {...item} /> : <DrawerListItemLink key={'drawer_d'+props.depth+"_id"+id} depth={props.depth+1} {...item} />
)}
</Collapse>
</List>
......
......@@ -7,8 +7,7 @@ import { Grid, PagingPanel, Table, TableHeaderRow, TableSelection, TableFilterRo
import { CSVLink } from "react-csv";
import { Button } from 'reactstrap'
import { Helper } from "App/Helper";
import {AlertHandlerContext} from "../AlertHandler";
import {Authorized} from "../../Main/Authorized/Authorized";
import { AlertHandlerContext } from "../AlertHandler";
export class MemberGrid extends Component {
......@@ -152,7 +151,7 @@ export class MemberGrid extends Component {
};
render() {
const { rows, headers, columns, selection, tableColumnVisibilityColumnExtensions, width } = this.state;
const { rows, headers, selection, tableColumnVisibilityColumnExtensions } = this.state;
const { show_csv } = this.props;
const defaultFilters = [
......
......@@ -23,7 +23,6 @@ class AssociationPageLayout extends Component{
if (this.props.location.pathname === '/protected/v/home'){
sidebar = PublicSideBar
} else {
console.log(this.props.location.pathname.search("boardmember"));
sidebar = this.props.location.pathname.search("boardmember") < 0 ? AssociationMemberSideBar: AssociationBoardSideBar ;
}
......
......@@ -4,7 +4,11 @@ import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import uuid from 'uuid';
import { Link } from 'react-router-dom'
import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
import logo from "../../../../img/logo.png";
import { FaCheck, FaTimes, FaPause, FaBolt, FaQuestion } from "react-icons/fa";
import Badge from '@material-ui/core/Badge';
import Avatar from '@material-ui/core/Avatar';
import { withStyles } from '@material-ui/core/styles';
function AssociationsNavDropdown(props){
const { url, association_memberships } = props;
......@@ -31,13 +35,38 @@ function AssociationsNavDropdown(props){
);
}
const SmallAvatar = withStyles(theme => ({
root: {
width: 22,
height: 22,
border: `2px solid ${theme.palette.background.paper}`,
},
}))(Avatar);
const AssociationsNavTabs = (props) => {
const status_to_icon_dict = {
'Accepted': <FaCheck/>,
'Disputed': <FaBolt/>,
'Pending': <FaQuestion/>,
'Rejected': <FaTimes/>
};
return props.association_memberships.map((association_membership, id) =>
{
let association = association_membership.association;
let path = props.url+"/associations/"+association.slug+(association.is_board ? "/boardmember" : "/member");
return <NavTab to={path} key={uuid.v4()}>
<img onLoad={(image)=>props.onImgLoad(image, id)} className="associationlogo" src={association_membership.association.logo} alt='associationlogo'/>
<Badge
overlap="circle"
anchorOrigin={{
vertical: 'bottom',
horizontal: 'right',
}}
badgeContent={<SmallAvatar variant={'circle'} alt="">{status_to_icon_dict[association_membership.status]}</SmallAvatar>}
// badgeContent={<SmallAvatar alt="" src="/static/images/avatar/1.jpg" />}
>
<img onLoad={(image)=>props.onImgLoad(image, id)} className="associationlogo" src={association_membership.association.logo} alt='associationlogo'/>
</Badge>
</NavTab>
})
};
......
import React, {Component} from 'react';
import { withRouter } from 'react-router-dom'
import { Link, withRouter } from 'react-router-dom'
import clsx from 'clsx';
import Drawer from '@material-ui/core/Drawer';
import CssBaseline from '@material-ui/core/CssBaseline';
......@@ -8,22 +8,23 @@ import Toolbar from '@material-ui/core/Toolbar';
import Divider from '@material-ui/core/Divider';
import IconButton from '@material-ui/core/IconButton';
import MenuIcon from '@material-ui/icons/Menu';
import PeopleRoundedIcon from '@material-ui/icons/PeopleRounded';
import ChevronLeftIcon from '@material-ui/icons/ChevronLeft';
import logo from "../../../img/logo oud.png";
import { FaRegistered, FaSignOutAlt, FaSignInAlt, FaUser } from "react-icons/fa";
import AccountCircle from '@material-ui/icons/AccountCircle';
import MenuItem from '@material-ui/core/MenuItem';
import Menu from '@material-ui/core/Menu';
import MenuItem from '@material-ui/core/MenuItem';
import { green } from '@material-ui/core/colors';
import Hidden from '@material-ui/core/Hidden';
import { withStyles } from "@material-ui/core/styles";
import 'App/Components/Header/Header.css';
import ListItemLink from 'App/Components/Drawer/ListItemLink';
import Header from "App/Components/PageLayout/Header/Header";
import Sidebar from "App/Components/PageLayout/SideBar/SideBar";
import {AlertHandler, AlertHandlerContext} from "../AlertHandler";
import ListItemIcon from '@material-ui/core/ListItemIcon';
import ListItemText from '@material-ui/core/ListItemText';
const drawerWidth = 240;
......@@ -138,7 +139,7 @@ class PageLayout extends Component {
let list_link_menu_items = [];
if (localStorage.getItem("authenticated") === 'true') {
list_link_menu_items.push(
{to: "/protected/settings", icon: <FaUser/>, primary: 'Profile'},
{to: "/protected/v/settings", icon: <FaUser/>, primary: 'Profile'},
{to: "/account/logout", icon: <FaSignOutAlt/>, primary: 'Logout'},
)
} else {
......@@ -158,7 +159,11 @@ class PageLayout extends Component {
})}
>
<Toolbar>
{!this.state.openDrawer && <IconButton><img className={'HeaderBarLogo'} src={logo}/></IconButton>}
{!this.state.openDrawer &&
<IconButton onClick={()=>this.props.history.push('/protected/v/home')}>
<img className={'HeaderBarLogo'} src={logo} alt={''}/>
</IconButton>
}
{this.props.sidebar &&
<IconButton
color="inherit"
......@@ -199,11 +204,15 @@ class PageLayout extends Component {
onClose={this.handleClose}
>
{list_link_menu_items.map((list_link_menu_item, id)=>{
return <ListItemLink
return <MenuItem
component={Link}
key={"list_link_menu_item"+id}
icon={list_link_menu_item.icon}
to={list_link_menu_item.to}
primary={list_link_menu_item.primary}/>
primary={list_link_menu_item.primary}
>
<ListItemIcon>{list_link_menu_item.icon}</ListItemIcon>
<ListItemText primary={list_link_menu_item.primary} />
</MenuItem>
})}
</Menu>
</div>
......
......@@ -3,14 +3,6 @@ import HomeWorkIcon from '@material-ui/icons/HomeWork';
import InfoIcon from '@material-ui/icons/Info';
import EventIcon from '@material-ui/icons/Event';
import DrawerList from 'App/Components/Drawer/DrawerList';
import PeopleRoundedIcon from '@material-ui/icons/PeopleRounded';
import GroupWorkIcon from '@material-ui/icons/GroupWork';
import PersonAddIcon from '@material-ui/icons/PersonAdd';
import PersonAddDisabledIcon from '@material-ui/icons/PersonAddDisabled';
import PersonIcon from '@material-ui/icons/Person';
import ExitToAppIcon from '@material-ui/icons/ExitToApp';
import StorageIcon from '@material-ui/icons/Storage';
import WcIcon from '@material-ui/icons/Wc';
import SupervisedUserCircleIcon from '@material-ui/icons/SupervisedUserCircle';
import GradeIcon from '@material-ui/icons/Grade';
import AccountBoxIcon from '@material-ui/icons/AccountBox';
......
......@@ -29,7 +29,6 @@ export class Authorized extends Component {
};
redirect(data) {
console.log(data.association_memberships);
if (data.association_memberships.filter(membership=>membership.status==='claimed').length > 0) {
if (this.props.location.pathname !== "/protected/memberships/resolve") {
return <Redirect exact to={"/protected/memberships/resolve"}/>
......@@ -59,7 +58,7 @@ export class Authorized extends Component {
onError = () => {
this.context.handleAlertHandler('red', 'Token invalid');
this.props.history.push('/#error');
this.props.history.push('/account/logout');
};
render = () => {
......@@ -88,7 +87,6 @@ export class Authorized extends Component {
<>{this.onError()}</>
) : (
<div className="Authorized">
{console.log(data)}
{this.redirect(data)}
<Route exact path={url + "/memberships/resolve"}
render={() =>
......
......@@ -12,7 +12,6 @@ import EventModalBoard from "App/Screens/Calendar/EventModalBoard"
import { EventModalMember } from "App/Screens/Calendar/EventModalMember"
import { Helper } from "App/Helper";
const localizer = momentLocalizer(moment);
class AssociationCalendar extends Component {
......@@ -33,9 +32,9 @@ class AssociationCalendar extends Component {
morphDataToEvent = (data) => {
data.start_date = new Date(data.start_date);
data.end_date = new Date(data.end_date);
data.enrollable_from = data.enrollable_from !== null && new Date(data.enrollable_from);
data.enrollable_until = data.enrollable_until !== null && new Date(data.enrollable_until);
data.unenrollable_until = data.unenrollable_until !== null && new Date(data.unenrollable_until);
// data.enrollable_from = data.enrollable_from !== null && new Date(data.enrollable_from);
// data.enrollable_until = data.enrollable_until !== null && new Date(data.enrollable_until);
// data.unenrollable_until = data.unenrollable_until !== null && new Date(data.unenrollable_until);
return data
};
......@@ -57,6 +56,7 @@ class AssociationCalendar extends Component {
end_date: new Date(),
type: '',
name: '',
location: '',
description: '',
enrollable: false,
unenrollable: false,
......@@ -160,7 +160,8 @@ class AssociationCalendar extends Component {
);
};
handleEventChange = (field, value) => {
handleEventChange = (field, value, value2) => {
console.log(field, value);
this.setState(prevState => {
let event = prevState.current_event;
if (field === 'enrollable') {
......@@ -241,7 +242,6 @@ class AssociationCalendar extends Component {
};
render() {
console.log(this.state);
return (
<>
<BackButton history={this.props.history} container={true}/>
......
import React, { Component } from "react";
import { AvField, AvForm, AvCheckbox, AvGroup, AvInput, AvFeedback } from "availity-reactstrap-validation";
import Modal from 'react-bootstrap/Modal';
import { Col, Container, Row, Label, CustomInput} from "reactstrap";
import "react-bootstrap-switch/dist/css/bootstrap3/react-bootstrap-switch.css";
import TextField from '@material-ui/core/TextField';
import { KeyboardDateTimePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
import MomentUtils from '@date-io/moment';
import moment from 'moment';
import CalendarToday from '@material-ui/icons/CalendarToday';
import { withStyles } from "@material-ui/core";
import Notes from '@material-ui/icons/Notes';
......@@ -110,11 +108,10 @@ class EventModalBoard extends Component {
const pickerEditorProps = field => ({
className: classes.picker,
// keyboard: true,
ampm: false,
inputVariant: 'outlined',
format: 'DD/MM/YYYY HH:mm',
onError: () => null,
format: 'YYYY/MM/DD HH:mm',
label: field,
});
return (
......@@ -125,7 +122,6 @@ class EventModalBoard extends Component {
centered={true}
dialogClassName={classes.modal}
>
{console.log(this.props.current_event)}
<ValidatorForm
onSubmit={this.handleValidSubmit}
ref="modal_form"
......@@ -149,18 +145,16 @@ class EventModalBoard extends Component {
</div>
<div className={classes.wrapper}>
<CalendarToday className={classes.icon} color="action" />
<MuiPickersUtilsProvider utils={MomentUtils}>
<MuiPickersUtilsProvider libInstance={moment} utils={MomentUtils}>
<KeyboardDateTimePicker
label="Start Date"
{...pickerEditorProps('startDate')}
value={this.props.current_event.start_date}
onChange={(datetime_util_object) => this.props.handleEventChange('start_date', datetime_util_object._d)}
onChange={datetime_util_object => this.props.handleEventChange('start_date', datetime_util_object.toDate())}
{...pickerEditorProps('Start Date')}
/>
<KeyboardDateTimePicker
label="End Date"
{...pickerEditorProps('endDate')}
value={this.props.current_event.end_date}
onChange={(datetime_util_object) => this.props.handleEventChange('end_date', datetime_util_object._d)}
onChange={datetime_util_object => this.props.handleEventChange('end_date', datetime_util_object.toDate())}
{...pickerEditorProps('End Date')}
/>
</MuiPickersUtilsProvider>
</div>
......
......@@ -4,6 +4,7 @@ import 'react-table/react-table.css'
import { IntegratedPaging, IntegratedSelection, PagingState, SelectionState, FilteringState, IntegratedFiltering, SortingState,IntegratedSorting, SearchState } from '@devexpress/dx-react-grid'
import { Grid, PagingPanel, Table, TableHeaderRow, TableSelection, TableFilterRow, Toolbar, SearchPanel} from '@devexpress/dx-react-grid-bootstrap4'
import { Button } from 'reactstrap'
import { Helper } from "../../Helper";
export class GroupMemberManagementAssociationMemberList extends Component {
......@@ -68,18 +69,12 @@ export class GroupMemberManagementAssociationMemberList extends Component {
};
postGroupMembership(group_membership){
return fetch(process.env.REACT_APP_API_URL + "/group_memberships/", {
method: "POST",
redirect: 'follow',
headers: {
"Authorization": localStorage.getItem("SUN_api_token"),
"Content-Type": "application/json"
},
body:JSON.stringify(group_membership)
}).then(function (resp) {
console.log(resp);
return resp.json();
}).catch(error=>console.error(error))
Helper.api_call(
process.env.REACT_APP_API_URL + "/group_memberships/",
"POST",
group_membership,
'json',
);
}
// ------
......
......@@ -4,10 +4,9 @@ import 'react-table/react-table.css';
import './GroupMemberManagementGroupMemberList.css';
import { FilteringState, SortingState,IntegratedSorting, EditingState } from '@devexpress/dx-react-grid';
import { Grid, Table, TableHeaderRow, TableEditRow, TableEditColumn} from '@devexpress/dx-react-grid-bootstrap4';
import { Grid, Table, TableHeaderRow, TableEditRow, TableEditColumn } from '@devexpress/dx-react-grid-bootstrap4';
import { Helper } from "App/Helper";
import {AlertHandlerContext} from "../../Components/AlertHandler";
import {Authorized} from "../../Main/Authorized/Authorized";
import { AlertHandlerContext } from "../../Components/AlertHandler";
export class GroupMemberManagementGroupMemberList extends Component {
......
......@@ -144,7 +144,6 @@ class MembersCurrent extends Component {
const {association} = this.props;
return (
<x-fragment>
{console.log(this.state)}
{this.state.member_types !== undefined && this.state.members_current !== undefined &&
<div className="AllMembers">
<BackButton history={this.props.history} container={true}/>
......
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