Commit 3e3e23c9 authored by TJHeeringa's avatar TJHeeringa

Updated ProfileForm

parent 099ac80c
......@@ -79,69 +79,5 @@ const SpecificDataField = (props) =>{
form
);
};
// case "Choice":
// form = <AvField
// type={"select"}
// helpMessage={field.helper_text}
// name={name}
// >
// { field.choices.split(",").map((choice, c) => {
// return <option key={c} value={choice}>{ choice }</option>;
// }) }
// </AvField>;
// break;
// case "String":
// form = <AvField
// type={"text"}
// name={name}
// helpMessage={field.helper_text}
// />;
// break;
// case "Boolean":
// console.log(field.mandatory);
// if (field.mandatory) {
// form =
// <AvCheckboxGroup
// inline
// name={name}
// validate={{
// required: {
// value: true,
// errorMessage: "This is required."
// }
// }}
// >
// <AvCheckbox
// value={true}
// label={field.helper_text}
// />
// </AvCheckboxGroup>;
// } else {
// form = <AvField
// helpMessage={field.helper_text}
// type={"select"}
// name={name}
// >
// <option>Yes</option>
// <option>No</option>
// </AvField>;
// }
// break;
// case "Number":
// form = <AvField
// helpMessage={field.helper_text}
// type={"number"}
// name={name}
// />;
// break;
//
// }
// return (
// <FormGroup className={"FormGroup"}>
// <label>{ field.name }</label>
// { form }
// </FormGroup>
// );
export default SpecificDataField;
\ No newline at end of file
This diff is collapsed.
......@@ -2,7 +2,7 @@ import Info from "App/Components/Info/Info";
import PropTypes from "prop-types";
import React from "react";
export const ProfileInfo = (props) => {
const ProfileInfo = ({ profile }) => {
const morphProfileToData = (profile) => {
let data = [];
data["General"] = {
......@@ -32,8 +32,6 @@ export const ProfileInfo = (props) => {
return data;
};
const { profile } = props;
return (
<Info
headerless={false}
......
......@@ -104,11 +104,11 @@ const AssociationBoardDrawerList = (props) => {
icon: <EmailIcon />,
primary: "Emails",
items: [
{
icon: <AlternateEmailIcon />,
primary: "Send",
to: url + "/emails/send"
},
// {
// icon: <AlternateEmailIcon />,
// primary: "Send",
// to: url + "/emails/send"
// },
{
icon: <SubjectIcon />,
primary: "Lists",
......
......@@ -4,7 +4,7 @@ import { BackButton } from "App/Components/BackButton";
import { MembershipForm } from "App/Components/Forms/MembershipForm";
import { AssociationSpecificDataForm } from "App/Components/Forms/SpecificDataForm";
import Info from "App/Components/Info/Info";
import { ProfileInfo } from "App/Components/Info/ProfileInfo";
import ProfileInfo from "App/Components/Info/ProfileInfo";
import React, { Component } from "react";
import {Link,NavLink, withRouter} from "react-router-dom";
import { Button, Col, Row, Spinner } from "reactstrap";
......
import { Osiris } from "App/Components/Forms/Osiris";
import { ProfileInfo } from "App/Components/Info/ProfileInfo";
import { Profile } from "App/Components/InfoForms/Profile";
import {AvField, AvForm} from "availity-reactstrap-validation";
import React, {Component} from "react";
import {NavLink, Redirect,Route, withRouter} from "react-router-dom";
import {Button, Col, Container, Row} from "reactstrap";
import { v4 as uuidv4 } from "uuid";
import Block from "../../Components/PageLayout/Content/Block";
import {Helper} from "../../Helper";
......
import { BackButton } from "App/Components/BackButton";
import { ProfileInfo } from "App/Components/Info/ProfileInfo";
import ProfileInfo from "App/Components/Info/ProfileInfo";
import React, {Component} from "react";
import {NavLink, Redirect,Route, withRouter} from "react-router-dom";
import {Button, Col, Container, Row} from "reactstrap";
import { Redirect, withRouter} from "react-router-dom";
import { Col, Container, Row } from "reactstrap";
import Block from "../../Components/PageLayout/Content/Block";
......
......@@ -17,14 +17,14 @@ const useStyles = makeStyles(theme=>({
}
}));
const SharedProfile = (props) => {
const [formType, setFormType] = useState("info");
const SharedProfile = ({ preferred_profile }) => {
const theme = useTheme();
const classes = useStyles(theme);
const { preferred_profile } = props;
const [formType, setFormType] = useState("info");
const changeFormType = () => formType === "info" ? setFormType("form") : setFormType("info");
return (
<Container>
<Block className={"mt-20"}>
......@@ -46,6 +46,7 @@ const SharedProfile = (props) => {
profile={preferred_profile}
update={true}
disabled={false}
container={false}
/>
</Block>
</Container>
......
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