From e13e630cd6e4fc0b1ff92098a28a770794c7bb9a Mon Sep 17 00:00:00 2001 From: gabrhr <73925454+gabrhr@users.noreply.github.com> Date: Wed, 20 Apr 2022 10:19:29 -0500 Subject: =?UTF-8?q?A=C3=B1adir=20plantilla?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Base para front --- front/odiparpack/app/containers/Pages/.DS_Store | Bin 0 -> 6148 bytes .../app/containers/Pages/BlankPage/index.js | 28 +++ .../app/containers/Pages/Calendar/index.js | 137 ++++++++++++++ .../odiparpack/app/containers/Pages/Chat/index.js | 123 ++++++++++++ .../app/containers/Pages/Contact/index.js | 166 ++++++++++++++++ .../app/containers/Pages/Ecommerce/index.js | 117 ++++++++++++ .../odiparpack/app/containers/Pages/Email/index.js | 210 +++++++++++++++++++++ .../odiparpack/app/containers/Pages/Error/index.js | 33 ++++ .../containers/Pages/HelpSupport/ContactForm.js | 115 +++++++++++ .../app/containers/Pages/HelpSupport/Qna.js | 141 ++++++++++++++ .../Pages/HelpSupport/helpSupport-jss.js | 49 +++++ .../app/containers/Pages/HelpSupport/index.js | 58 ++++++ .../app/containers/Pages/Maintenance/index.js | 88 +++++++++ .../app/containers/Pages/Photos/index.js | 27 +++ .../containers/Pages/Settings/DetailSettings.js | 203 ++++++++++++++++++++ .../app/containers/Pages/Settings/index.js | 117 ++++++++++++ .../app/containers/Pages/Settings/settings-jss.js | 87 +++++++++ .../app/containers/Pages/SocialMedia/index.js | 110 +++++++++++ .../containers/Pages/Standalone/LoginDedicated.js | 33 ++++ .../Pages/Standalone/NotFoundDedicated.js | 24 +++ .../app/containers/Pages/UserProfile/index.js | 131 +++++++++++++ .../app/containers/Pages/Users/LockScreen.js | 55 ++++++ .../odiparpack/app/containers/Pages/Users/Login.js | 85 +++++++++ .../app/containers/Pages/Users/Register.js | 78 ++++++++ .../app/containers/Pages/Users/ResetPassword.js | 54 ++++++ 25 files changed, 2269 insertions(+) create mode 100644 front/odiparpack/app/containers/Pages/.DS_Store create mode 100644 front/odiparpack/app/containers/Pages/BlankPage/index.js create mode 100644 front/odiparpack/app/containers/Pages/Calendar/index.js create mode 100644 front/odiparpack/app/containers/Pages/Chat/index.js create mode 100644 front/odiparpack/app/containers/Pages/Contact/index.js create mode 100644 front/odiparpack/app/containers/Pages/Ecommerce/index.js create mode 100644 front/odiparpack/app/containers/Pages/Email/index.js create mode 100644 front/odiparpack/app/containers/Pages/Error/index.js create mode 100644 front/odiparpack/app/containers/Pages/HelpSupport/ContactForm.js create mode 100644 front/odiparpack/app/containers/Pages/HelpSupport/Qna.js create mode 100644 front/odiparpack/app/containers/Pages/HelpSupport/helpSupport-jss.js create mode 100644 front/odiparpack/app/containers/Pages/HelpSupport/index.js create mode 100644 front/odiparpack/app/containers/Pages/Maintenance/index.js create mode 100644 front/odiparpack/app/containers/Pages/Photos/index.js create mode 100644 front/odiparpack/app/containers/Pages/Settings/DetailSettings.js create mode 100644 front/odiparpack/app/containers/Pages/Settings/index.js create mode 100644 front/odiparpack/app/containers/Pages/Settings/settings-jss.js create mode 100644 front/odiparpack/app/containers/Pages/SocialMedia/index.js create mode 100644 front/odiparpack/app/containers/Pages/Standalone/LoginDedicated.js create mode 100644 front/odiparpack/app/containers/Pages/Standalone/NotFoundDedicated.js create mode 100644 front/odiparpack/app/containers/Pages/UserProfile/index.js create mode 100644 front/odiparpack/app/containers/Pages/Users/LockScreen.js create mode 100644 front/odiparpack/app/containers/Pages/Users/Login.js create mode 100644 front/odiparpack/app/containers/Pages/Users/Register.js create mode 100644 front/odiparpack/app/containers/Pages/Users/ResetPassword.js (limited to 'front/odiparpack/app/containers/Pages') diff --git a/front/odiparpack/app/containers/Pages/.DS_Store b/front/odiparpack/app/containers/Pages/.DS_Store new file mode 100644 index 0000000..f59225b Binary files /dev/null and b/front/odiparpack/app/containers/Pages/.DS_Store differ diff --git a/front/odiparpack/app/containers/Pages/BlankPage/index.js b/front/odiparpack/app/containers/Pages/BlankPage/index.js new file mode 100644 index 0000000..640da6e --- /dev/null +++ b/front/odiparpack/app/containers/Pages/BlankPage/index.js @@ -0,0 +1,28 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { PapperBlock } from 'ba-components'; + +class BlankPage extends React.Component { + render() { + const title = brand.name + ' - Blank Page'; + const description = brand.desc; + return ( +
+ + {title} + + + + + + + + Content + +
+ ); + } +} + +export default BlankPage; diff --git a/front/odiparpack/app/containers/Pages/Calendar/index.js b/front/odiparpack/app/containers/Pages/Calendar/index.js new file mode 100644 index 0000000..fd5f412 --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Calendar/index.js @@ -0,0 +1,137 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import events from 'ba-api/eventData'; +import { bindActionCreators } from 'redux'; +import { connect } from 'react-redux'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import 'ba-styles/vendors/react-big-calendar/react-big-calendar.css'; +import { EventCalendar, DetailEvent, AddEvent, Notification } from 'ba-components'; +import { + fetchAction, + addAction, + discardAction, + submitAction, + deleteAction, + closeNotifAction +} from 'ba-actions/CalendarEventActions'; + +const styles = { + root: { + display: 'block' + } +}; + +class Calendar extends React.Component { + state = { + anchorEl: false, + event: null, + anchorPos: { top: 0, left: 0 } + }; + + componentDidMount() { + this.props.fetchEventsData(events); + } + + handleClick = event => { + setTimeout(() => { + const target = document.getElementsByClassName('rbc-selected')[0]; + const targetBounding = target.getBoundingClientRect(); + this.setState({ + event, + anchorEl: true, + anchorPos: { top: targetBounding.top, left: targetBounding.left } + }); + }, 200); + }; + + handleClose = () => { + this.setState({ + anchorEl: false, + }); + }; + + render() { + const title = brand.name + ' - Calendar'; + const description = brand.desc; + const { anchorEl, anchorPos, event } = this.state; + const { + classes, + eventData, + openFrm, + addEvent, + discardEvent, + submit, + remove, + closeNotif, + messageNotif + } = this.props; + return ( +
+ + {title} + + + + + + + closeNotif()} message={messageNotif} /> +
+ + + +
+
+ ); + } +} + +Calendar.propTypes = { + classes: PropTypes.object.isRequired, + eventData: PropTypes.object.isRequired, + fetchEventsData: PropTypes.func.isRequired, + addEvent: PropTypes.func.isRequired, + submit: PropTypes.func.isRequired, + discardEvent: PropTypes.func.isRequired, + remove: PropTypes.func.isRequired, + openFrm: PropTypes.bool.isRequired, + closeNotif: PropTypes.func.isRequired, + messageNotif: PropTypes.string.isRequired, +}; + +const reducer = 'calendar'; +const mapStateToProps = state => ({ + force: state, // force state from reducer + eventData: state.getIn([reducer, 'events']), + openFrm: state.getIn([reducer, 'openFrm']), + messageNotif: state.getIn([reducer, 'notifMsg']), +}); + +const constDispatchToProps = dispatch => ({ + fetchEventsData: bindActionCreators(fetchAction, dispatch), + submit: bindActionCreators(submitAction, dispatch), + remove: bindActionCreators(deleteAction, dispatch), + addEvent: () => dispatch(addAction), + discardEvent: () => dispatch(discardAction), + closeNotif: () => dispatch(closeNotifAction), +}); + +const CalendarMapped = connect( + mapStateToProps, + constDispatchToProps +)(Calendar); + +export default withStyles(styles)(CalendarMapped); diff --git a/front/odiparpack/app/containers/Pages/Chat/index.js b/front/odiparpack/app/containers/Pages/Chat/index.js new file mode 100644 index 0000000..99cf875 --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Chat/index.js @@ -0,0 +1,123 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { bindActionCreators } from 'redux'; +import { connect } from 'react-redux'; +import contactData from 'ba-api/contactData'; +import chatData from 'ba-api/chatData'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { fetchAction, searchAction } from 'ba-actions/ContactActions'; +import { + fetchChatAction, + showChatAction, + sendAction, + hideDetailAction, + deleteAction +} from 'ba-actions/ChatActions'; +import { ContactList, ChatHeader, ChatRoom } from 'ba-components'; +import styles from 'ba-components/Contact/contact-jss'; + +class Chat extends React.Component { + componentDidMount() { + this.props.fetchChatData(chatData); + this.props.fetchContactData(contactData); + } + + render() { + const title = brand.name + ' - Chat App'; + const description = brand.desc; + const { + classes, + dataContact, + showDetail, + hideDetail, + keyword, + search, + dataChat, + chatSelected, + sendMessage, + remove, + showMobileDetail + } = this.props; + return ( +
+ + {title} + + + + + + +
+ + + +
+
+ ); + } +} + +Chat.propTypes = { + classes: PropTypes.object.isRequired, + fetchContactData: PropTypes.func.isRequired, + fetchChatData: PropTypes.func.isRequired, + showDetail: PropTypes.func.isRequired, + hideDetail: PropTypes.func.isRequired, + sendMessage: PropTypes.func.isRequired, + search: PropTypes.func.isRequired, + remove: PropTypes.func.isRequired, + keyword: PropTypes.string.isRequired, + dataContact: PropTypes.object.isRequired, + dataChat: PropTypes.object.isRequired, + chatSelected: PropTypes.number.isRequired, + showMobileDetail: PropTypes.bool.isRequired, +}; + +const reducerContact = 'contact'; +const reducerChat = 'chat'; +const mapStateToProps = state => ({ + force: state, // force state from reducer + dataContact: state.getIn([reducerContact, 'contactList']), + dataChat: state.getIn([reducerChat, 'activeChat']), + chatSelected: state.getIn([reducerChat, 'chatSelected']), + showMobileDetail: state.getIn([reducerChat, 'showMobileDetail']), + keyword: state.getIn([reducerContact, 'keywordValue']), +}); + +const dispatchToProps = dispatch => ({ + fetchContactData: bindActionCreators(fetchAction, dispatch), + hideDetail: () => dispatch(hideDetailAction), + fetchChatData: bindActionCreators(fetchChatAction, dispatch), + showDetail: bindActionCreators(showChatAction, dispatch), + search: bindActionCreators(searchAction, dispatch), + sendMessage: bindActionCreators(sendAction, dispatch), + remove: () => dispatch(deleteAction), +}); + +const ChatMapped = connect( + mapStateToProps, + dispatchToProps +)(Chat); + +export default withStyles(styles)(ChatMapped); diff --git a/front/odiparpack/app/containers/Pages/Contact/index.js b/front/odiparpack/app/containers/Pages/Contact/index.js new file mode 100644 index 0000000..8ed34de --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Contact/index.js @@ -0,0 +1,166 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { bindActionCreators } from 'redux'; +import { connect } from 'react-redux'; +import data from 'ba-api/contactData'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import dummy from 'ba-api/dummyContents'; +import { + fetchAction, + showDetailAction, + hideDetailAction, + submitAction, + editAction, + addAction, + closeAction, + removeAction, + addToFavoriteAction, + searchAction, + closeNotifAction +} from 'ba-actions/ContactActions'; +import { + ContactHeader, + ContactList, + ContactDetail, + AddContact, + Notification +} from 'ba-components'; +import styles from 'ba-components/Contact/contact-jss'; + +class Contact extends React.Component { + componentDidMount() { + this.props.fetchData(data); + } + + submitContact = (item, avatar) => { + const { submit } = this.props; + const avatarBase64 = typeof avatar === 'object' ? URL.createObjectURL(avatar) : avatar; + const avatarPreview = avatar !== null ? avatarBase64 : dummy.user.avatar; + submit(item, avatarPreview); + } + + render() { + const title = brand.name + ' - Contact'; + const description = brand.desc; + const { + classes, + dataContact, + itemSelected, + showDetail, + hideDetail, + avatarInit, + open, + showMobileDetail, + add, + edit, + close, + remove, + favorite, + keyword, + search, + closeNotif, + messageNotif + } = this.props; + return ( +
+ + {title} + + + + + + + closeNotif()} message={messageNotif} /> +
+ + + +
+ +
+ ); + } +} + +Contact.propTypes = { + classes: PropTypes.object.isRequired, + avatarInit: PropTypes.string.isRequired, + fetchData: PropTypes.func.isRequired, + showDetail: PropTypes.func.isRequired, + hideDetail: PropTypes.func.isRequired, + keyword: PropTypes.string.isRequired, + open: PropTypes.bool.isRequired, + showMobileDetail: PropTypes.bool.isRequired, + add: PropTypes.func.isRequired, + close: PropTypes.func.isRequired, + submit: PropTypes.func.isRequired, + edit: PropTypes.func.isRequired, + remove: PropTypes.func.isRequired, + favorite: PropTypes.func.isRequired, + search: PropTypes.func.isRequired, + dataContact: PropTypes.object.isRequired, + itemSelected: PropTypes.number.isRequired, + closeNotif: PropTypes.func.isRequired, + messageNotif: PropTypes.string.isRequired, +}; + +const reducer = 'contact'; +const mapStateToProps = state => ({ + force: state, // force state from reducer + avatarInit: state.getIn([reducer, 'avatarInit']), + dataContact: state.getIn([reducer, 'contactList']), + itemSelected: state.getIn([reducer, 'selectedIndex']), + keyword: state.getIn([reducer, 'keywordValue']), + open: state.getIn([reducer, 'openFrm']), + showMobileDetail: state.getIn([reducer, 'showMobileDetail']), + messageNotif: state.getIn([reducer, 'notifMsg']), +}); + +const constDispatchToProps = dispatch => ({ + fetchData: bindActionCreators(fetchAction, dispatch), + showDetail: bindActionCreators(showDetailAction, dispatch), + hideDetail: () => dispatch(hideDetailAction), + submit: bindActionCreators(submitAction, dispatch), + edit: bindActionCreators(editAction, dispatch), + add: () => dispatch(addAction), + close: () => dispatch(closeAction), + remove: bindActionCreators(removeAction, dispatch), + favorite: bindActionCreators(addToFavoriteAction, dispatch), + search: bindActionCreators(searchAction, dispatch), + closeNotif: () => dispatch(closeNotifAction), +}); + +const ContactMapped = connect( + mapStateToProps, + constDispatchToProps +)(Contact); + +export default withStyles(styles)(ContactMapped); diff --git a/front/odiparpack/app/containers/Pages/Ecommerce/index.js b/front/odiparpack/app/containers/Pages/Ecommerce/index.js new file mode 100644 index 0000000..8eb15a4 --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Ecommerce/index.js @@ -0,0 +1,117 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { bindActionCreators } from 'redux'; +import { connect } from 'react-redux'; +import data from 'ba-api/productData'; +import { SearchProduct, ProductGallery, Notification } from 'ba-components'; +import { + fetchAction, + addAction, + removeAction, + checkoutAction, + detailAction, + searchAction, + closeNotifAction +} from 'ba-actions/EcommerceActions'; + +class Ecommerce extends React.Component { + componentDidMount() { + this.props.fetchData(data); + } + + render() { + const title = brand.name + ' - Ecommerce'; + const description = brand.desc; + const { + dataProduct, + handleAddToCart, + dataCart, + removeItem, + checkout, + showDetail, + productIndex, + totalItems, + totalPrice, + search, + keyword, + closeNotif, + messageNotif + } = this.props; + return ( +
+ + {title} + + + + + + + closeNotif()} message={messageNotif} /> + + +
+ ); + } +} + +Ecommerce.propTypes = { + fetchData: PropTypes.func.isRequired, + handleAddToCart: PropTypes.func.isRequired, + removeItem: PropTypes.func.isRequired, + showDetail: PropTypes.func.isRequired, + checkout: PropTypes.func.isRequired, + search: PropTypes.func.isRequired, + keyword: PropTypes.string.isRequired, + dataProduct: PropTypes.object.isRequired, + dataCart: PropTypes.object.isRequired, + productIndex: PropTypes.number.isRequired, + totalItems: PropTypes.number.isRequired, + totalPrice: PropTypes.number.isRequired, + closeNotif: PropTypes.func.isRequired, + messageNotif: PropTypes.string.isRequired, +}; + +const reducer = 'ecommerce'; +const mapStateToProps = state => ({ + force: state, // force state from reducer + keyword: state.getIn([reducer, 'keywordValue']), + dataProduct: state.getIn([reducer, 'productList']), + dataCart: state.getIn([reducer, 'cart']), + productIndex: state.getIn([reducer, 'productIndex']), + totalItems: state.getIn([reducer, 'totalItems']), + totalPrice: state.getIn([reducer, 'totalPrice']), + messageNotif: state.getIn([reducer, 'notifMsg']), +}); + +const constDispatchToProps = dispatch => ({ + fetchData: bindActionCreators(fetchAction, dispatch), + search: bindActionCreators(searchAction, dispatch), + handleAddToCart: bindActionCreators(addAction, dispatch), + removeItem: bindActionCreators(removeAction, dispatch), + showDetail: bindActionCreators(detailAction, dispatch), + checkout: () => dispatch(checkoutAction), + closeNotif: () => dispatch(closeNotifAction), +}); + +const EcommerceMapped = connect( + mapStateToProps, + constDispatchToProps +)(Ecommerce); + +export default EcommerceMapped; diff --git a/front/odiparpack/app/containers/Pages/Email/index.js b/front/odiparpack/app/containers/Pages/Email/index.js new file mode 100644 index 0000000..93285cb --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Email/index.js @@ -0,0 +1,210 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { bindActionCreators } from 'redux'; +import { connect } from 'react-redux'; +import data from 'ba-api/emailData'; +import { + EmailHeader, + EmailList, + EmailSidebar, + ComposeEmail, + Notification +} from 'ba-components'; +import { + fetchMailAction, + openMailAction, + filterAction, + composeAction, + discardAction, + searchAction, + sendAction, + moveAction, + deleteAction, + toggleStaredAction, + closeNotifAction +} from 'ba-actions/EmailActions'; + +const styles = theme => ({ + root: { + flexGrow: 1, + minHeight: 600, + zIndex: 1, + background: theme.palette.grey[50], + overflow: 'hidden', + display: 'flex', + boxShadow: theme.shadows[2] + } +}); + +// validation functions +const email = value => ( + value && !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(value) + ? 'Invalid email' + : '' +); + +class Email extends React.Component { + state = { + to: '', + subject: '', + validMail: '', + mobileOpen: false, + }; + + componentDidMount() { + this.props.fetchData(data); + } + + handleChange = (event, name) => { + if (name === 'to') { + this.setState({ validMail: email(event.target.value) }); + } + this.setState({ + [name]: event.target.value, + }); + }; + + handleReply = (mail) => { + this.props.compose(); + this.setState({ + to: mail.get('name'), + subject: 'Reply: ' + mail.get('subject'), + }); + } + + handleCompose = () => { + this.props.compose(); + this.setState({ + to: ' ', + subject: ' ', + }); + } + + handleDrawerToggle = () => { + this.setState(state => ({ mobileOpen: !state.mobileOpen })); + }; + + render() { + const { + classes, + emailData, + openMail, + goto, + currentPage, + openFrm, + discard, + search, + keyword, + sendEmail, + moveTo, + remove, + toggleStar, + closeNotif, + messageNotif + } = this.props; + const { + to, + subject, + validMail, + mobileOpen + } = this.state; + const title = brand.name + ' - Email'; + const description = brand.desc; + return ( +
+ + {title} + + + + + + + closeNotif()} message={messageNotif} /> + + + + +
+ ); + } +} + +Email.propTypes = { + classes: PropTypes.object.isRequired, + emailData: PropTypes.object.isRequired, + fetchData: PropTypes.func.isRequired, + openMail: PropTypes.func.isRequired, + goto: PropTypes.func.isRequired, + compose: PropTypes.func.isRequired, + discard: PropTypes.func.isRequired, + search: PropTypes.func.isRequired, + sendEmail: PropTypes.func.isRequired, + moveTo: PropTypes.func.isRequired, + remove: PropTypes.func.isRequired, + toggleStar: PropTypes.func.isRequired, + keyword: PropTypes.string.isRequired, + currentPage: PropTypes.string.isRequired, + openFrm: PropTypes.bool.isRequired, + closeNotif: PropTypes.func.isRequired, + messageNotif: PropTypes.string.isRequired, +}; + +const reducer = 'email'; +const mapStateToProps = state => ({ + force: state, // force state from reducer + keyword: state.getIn([reducer, 'keywordValue']), + initValues: state.getIn([reducer, 'formValues']), + emailData: state.getIn([reducer, 'inbox']), + currentPage: state.getIn([reducer, 'currentPage']), + openFrm: state.getIn([reducer, 'openFrm']), + messageNotif: state.getIn([reducer, 'notifMsg']), +}); + +const constDispatchToProps = dispatch => ({ + fetchData: bindActionCreators(fetchMailAction, dispatch), + openMail: bindActionCreators(openMailAction, dispatch), + goto: bindActionCreators(filterAction, dispatch), + search: bindActionCreators(searchAction, dispatch), + moveTo: bindActionCreators(moveAction, dispatch), + remove: bindActionCreators(deleteAction, dispatch), + toggleStar: bindActionCreators(toggleStaredAction, dispatch), + compose: () => dispatch(composeAction), + discard: () => dispatch(discardAction), + sendEmail: bindActionCreators(sendAction, dispatch), + closeNotif: () => dispatch(closeNotifAction), +}); + +const EmailMapped = connect( + mapStateToProps, + constDispatchToProps +)(Email); + +export default withStyles(styles)(EmailMapped); diff --git a/front/odiparpack/app/containers/Pages/Error/index.js b/front/odiparpack/app/containers/Pages/Error/index.js new file mode 100644 index 0000000..b408b53 --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Error/index.js @@ -0,0 +1,33 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { Route } from 'react-router-dom'; +import { ErrorWrap } from 'ba-components'; + +const title = brand.name + ' - Aplication Error'; +const description = brand.desc; + +const Error = () => ( + { + if (staticContext) { + staticContext.status = 404; // eslint-disable-line + } + return ( +
+ + {title} + + + + + + + +
+ ); + }} + /> +); + +export default Error; diff --git a/front/odiparpack/app/containers/Pages/HelpSupport/ContactForm.js b/front/odiparpack/app/containers/Pages/HelpSupport/ContactForm.js new file mode 100644 index 0000000..2568943 --- /dev/null +++ b/front/odiparpack/app/containers/Pages/HelpSupport/ContactForm.js @@ -0,0 +1,115 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { Field, reduxForm } from 'redux-form/immutable'; +import { bindActionCreators } from 'redux'; +import { connect } from 'react-redux'; +import { PapperBlock } from 'ba-components'; +import { initAction, clearAction } from 'ba-actions/ReduxFormActions'; +import { TextFieldRedux } from 'ba-components/Forms/ReduxFormMUI'; +import { Button } from '@material-ui/core'; +import styles from './helpSupport-jss'; + +// validation functions +const required = value => (value == null ? 'Required' : undefined); +const email = value => ( + value && !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(value) + ? 'Invalid email' + : undefined +); + +class ContactForm extends Component { + render() { + const trueBool = true; + const { + classes, + handleSubmit, + pristine, + reset, + submitting, + } = this.props; + return ( +
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+
+
+
+ ); + } +} + +ContactForm.propTypes = { + classes: PropTypes.object.isRequired, + handleSubmit: PropTypes.func.isRequired, + reset: PropTypes.func.isRequired, + pristine: PropTypes.bool.isRequired, + submitting: PropTypes.bool.isRequired, +}; + +const mapDispatchToProps = dispatch => ({ + init: bindActionCreators(initAction, dispatch), + clear: () => dispatch(clearAction), +}); + +const ContactFormMapped = reduxForm({ + form: 'immutableExample', +})(ContactForm); + +const reducer = 'initval'; +const FormInit = connect( + state => ({ + force: state, + initialValues: state.getIn([reducer, 'formValues']) + }), + mapDispatchToProps, +)(ContactFormMapped); + +export default withStyles(styles)(FormInit); diff --git a/front/odiparpack/app/containers/Pages/HelpSupport/Qna.js b/front/odiparpack/app/containers/Pages/HelpSupport/Qna.js new file mode 100644 index 0000000..bb8a6ae --- /dev/null +++ b/front/odiparpack/app/containers/Pages/HelpSupport/Qna.js @@ -0,0 +1,141 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; +import { ExpansionPanel, ExpansionPanelDetails, ExpansionPanelSummary, Typography } from '@material-ui/core'; +import styles from './helpSupport-jss'; + + +class Qna extends React.Component { + state = { + expanded: null, + }; + + handleChange = panel => (event, expanded) => { + this.setState({ + expanded: expanded ? panel : false, + }); + }; + + render() { + const { classes } = this.props; + const { expanded } = this.state; + + return ( +
+ + }> + Pellentesque ac bibendum tortor? + + + + Nulla facilisi. Phasellus sollicitudin nulla et quam mattis feugiat. Aliquam eget + maximus est, id dignissim quam. + + + + + }> + Vivamus sit amet interdum elit? + + + + Donec placerat, lectus sed mattis semper, neque lectus feugiat lectus, varius pulvinar + diam eros in elit. Pellentesque convallis laoreet laoreet. + + + + + }> + Vestibulum nec mi suscipit? + + + + Nunc vitae orci ultricies, auctor nunc in, volutpat nisl. Integer sit amet egestas + eros, vitae egestas augue. Duis vel est augue. + + + + + }> + Cras convallis lacus orci? + + + + Nunc vitae orci ultricies, auctor nunc in, volutpat nisl. Integer sit amet egestas + eros, vitae egestas augue. Duis vel est augue. + + + + + }> + Quisque ut metus sit amet? + + + + enean sit amet magna vel magna fringilla fermentum. Donec sit amet nulla sed arcu pulvinar ultricies commodo id ligula. + + + + + }> + Nulla vehicula leo ut augue tincidunt? + + + + Curabitur egestas consequat lorem, vel fermentum augue porta id. Aliquam lobortis magna neque, gravida consequat velit venenatis at. + + + + + }> + Vivamus sit amet interdum elit? + + + + Donec dignissim, odio ac imperdiet luctus, ante nisl accumsan justo, et venenatis ante metus pellentesque sem. + + + + + }> + Maecenas nisl libero, tincidunt id odio id? + + + + Ut sed eros finibus, placerat orci id, dapibus mauris. Vestibulum consequat hendrerit lacus. In id nisi id neque venenatis molestie. + + + + + }> + Vestibulum nec mi suscipit? + + + + Nunc vitae orci ultricies, auctor nunc in, volutpat nisl. Integer sit amet egestas + eros, vitae egestas augue. Duis vel est augue. + + + + + }> + Cras convallis lacus orci? + + + + Nunc vitae orci ultricies, auctor nunc in, volutpat nisl. Integer sit amet egestas + eros, vitae egestas augue. Duis vel est augue. + + + +
+ ); + } +} + +Qna.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(Qna); diff --git a/front/odiparpack/app/containers/Pages/HelpSupport/helpSupport-jss.js b/front/odiparpack/app/containers/Pages/HelpSupport/helpSupport-jss.js new file mode 100644 index 0000000..5c954cb --- /dev/null +++ b/front/odiparpack/app/containers/Pages/HelpSupport/helpSupport-jss.js @@ -0,0 +1,49 @@ +const styles = theme => ({ + title: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + color: theme.palette.common.white, + }, + iconTitle: { + position: 'relative', + top: theme.spacing(0.5), + marginRight: theme.spacing(0.5), + }, + heading: { + fontSize: theme.typography.pxToRem(15), + flexBasis: '100%', + fontWeight: 700, + flexShrink: 0, + }, + secondaryHeading: { + fontSize: theme.typography.pxToRem(15), + color: theme.palette.text.secondary, + }, + root: { + width: '100%', + flexGrow: 1, + padding: 30 + }, + field: { + width: '100%', + marginBottom: 20 + }, + fieldBasic: { + width: '100%', + marginBottom: 20, + marginTop: 10 + }, + inlineWrap: { + display: 'flex', + flexDirection: 'row' + }, + buttonInit: { + margin: theme.spacing(4), + textAlign: 'center' + }, + frmWrap: { + marginTop: theme.spacing(1) * -3 + } +}); + +export default styles; diff --git a/front/odiparpack/app/containers/Pages/HelpSupport/index.js b/front/odiparpack/app/containers/Pages/HelpSupport/index.js new file mode 100644 index 0000000..68df97b --- /dev/null +++ b/front/odiparpack/app/containers/Pages/HelpSupport/index.js @@ -0,0 +1,58 @@ +import React from 'react'; +import { PropTypes } from 'prop-types'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import LiveHelp from '@material-ui/icons/LiveHelp'; +import { isWidthUp } from '@material-ui/core/withWidth'; +import { withStyles } from '@material-ui/core/styles'; +import { Typography, withWidth, Grid } from '@material-ui/core'; +import styles from './helpSupport-jss'; +import Qna from './Qna'; +import ContactForm from './ContactForm'; + + +class Settings extends React.Component { + showResult(values) { + setTimeout(() => { + this.setState({ valueForm: values }); + window.alert(`You submitted:\n\n${this.state.valueForm}`); + }, 500); // simulate server latency + } + + render() { + const title = brand.name; + const description = brand.desc; + const { classes, width } = this.props; + return ( +
+ + {title} + + + + + + + + + Help & Support + + + + + + + this.showResult(values)} /> + + +
+ ); + } +} + +Settings.propTypes = { + classes: PropTypes.object.isRequired, + width: PropTypes.string.isRequired, +}; + +export default withStyles(styles)(withWidth()(Settings)); diff --git a/front/odiparpack/app/containers/Pages/Maintenance/index.js b/front/odiparpack/app/containers/Pages/Maintenance/index.js new file mode 100644 index 0000000..8771e51 --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Maintenance/index.js @@ -0,0 +1,88 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import Build from '@material-ui/icons/Build'; +import Settings from '@material-ui/icons/SettingsApplications'; +import Warning from '@material-ui/icons/Warning'; +import { Typography, Avatar, Hidden, Paper } from '@material-ui/core'; + +const styles = theme => ({ + root: { + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + height: '100%' + }, + paper: { + margin: 'auto', + padding: 40, + width: '90%', + [theme.breakpoints.up('sm')]: { + width: 600, + height: 300, + }, + textAlign: 'center' + }, + artwork: { + display: 'flex', + justifyContent: 'center', + marginBottom: 30 + }, + icon: { + margin: '10px 20px', + background: theme.palette.secondary.main, + color: theme.palette.common.white, + width: 100, + height: 100, + '& svg': { + fontSize: 64, + }, + }, +}); + +class Maintenance extends React.Component { + render() { + const title = brand.name + ' - Maintenance'; + const description = brand.desc; + const { classes } = this.props; + return ( +
+ + {title} + + + + + + +
+ +
+ + + + + + + +
+ Website under maintenance + +Our website is under maintenance. We + {"'"} +ll be back shortly + +
+
+
+ ); + } +} + +Maintenance.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(Maintenance); diff --git a/front/odiparpack/app/containers/Pages/Photos/index.js b/front/odiparpack/app/containers/Pages/Photos/index.js new file mode 100644 index 0000000..7068ed5 --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Photos/index.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import imgData from 'ba-api/imgDataMasonry'; +import { PhotoGallery } from 'ba-components'; + +class Photos extends React.Component { + render() { + const title = brand.name + ' - Photo Gallery'; + const description = brand.desc; + return ( +
+ + {title} + + + + + + + +
+ ); + } +} + +export default Photos; diff --git a/front/odiparpack/app/containers/Pages/Settings/DetailSettings.js b/front/odiparpack/app/containers/Pages/Settings/DetailSettings.js new file mode 100644 index 0000000..25bad64 --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Settings/DetailSettings.js @@ -0,0 +1,203 @@ +import React from 'react'; +import { PropTypes } from 'prop-types'; +import classNames from 'classnames'; +import SettingsIcon from '@material-ui/icons/SettingsApplications'; +import CloseIcon from '@material-ui/icons/Close'; +import { withStyles } from '@material-ui/core/styles'; +import { + AppBar, + Grid, + Dialog, + Toolbar, + ListItemText, + ListItem, + List, + ListItemSecondaryAction, + Divider, + IconButton, + Typography, + Button, + Switch, + Slide, + InputLabel, + MenuItem, + FormControl, + Select, + Checkbox, + TextField, +} from '@material-ui/core'; +import styles from './settings-jss'; + + +const Transition = React.forwardRef(function Transition(props, ref) { // eslint-disable-line + return ; +}); + +class DetailSettings extends React.Component { + state = { + checked: ['switch', 'check2'], + option: '', + }; + + handleToggle = value => () => { + const { checked } = this.state; + const currentIndex = checked.indexOf(value); + const newChecked = [...checked]; + + if (currentIndex === -1) { + newChecked.push(value); + } else { + newChecked.splice(currentIndex, 1); + } + + this.setState({ + checked: newChecked, + }); + }; + + handleChange = name => event => { + this.setState({ + [name]: event.target.value, + }); + }; + + handleChangeSelection = event => { + this.setState({ [event.target.name]: event.target.value }); + }; + + render() { + const { classes, open, handleClose } = this.props; + return ( + + + + + + + + Setting + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Option + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); + } +} + +DetailSettings.propTypes = { + classes: PropTypes.object.isRequired, + open: PropTypes.bool.isRequired, + handleClose: PropTypes.func.isRequired, +}; + +export default withStyles(styles)(DetailSettings); diff --git a/front/odiparpack/app/containers/Pages/Settings/index.js b/front/odiparpack/app/containers/Pages/Settings/index.js new file mode 100644 index 0000000..2ab94d2 --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Settings/index.js @@ -0,0 +1,117 @@ +import React from 'react'; +import { PropTypes } from 'prop-types'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import SearchIcon from '@material-ui/icons/Search'; +import SettingsIcon from '@material-ui/icons/SettingsApplications'; +import { withStyles } from '@material-ui/core/styles'; +import settingList from 'ba-api/settingList'; +import { AppBar, Grid, Toolbar, Typography, Button, Icon } from '@material-ui/core'; +import DetailSettings from './DetailSettings'; +import styles from './settings-jss'; + + +class Settings extends React.Component { + state = { + open: false, + checked: ['switch', 'check2'], + keyword: '' + }; + + handleToggle = value => () => { + const { checked } = this.state; + const currentIndex = checked.indexOf(value); + const newChecked = [...checked]; + + if (currentIndex === -1) { + newChecked.push(value); + } else { + newChecked.splice(currentIndex, 1); + } + + this.setState({ + checked: newChecked, + }); + }; + + handleChange = name => event => { + this.setState({ + [name]: event.target.value, + }); + }; + + handleClickOpen = () => { + this.setState({ open: true }); + }; + + handleClose = () => { + this.setState({ open: false }); + }; + + handleSearch = event => { + this.setState({ keyword: event.target.value.toLowerCase() }); + } + + render() { + const title = brand.name; + const description = brand.desc; + const { classes } = this.props; + const { keyword } = this.state; + return ( +
+ + {title} + + + + + + + + + Appication Settings + + + +
+
+
+ +
+ this.handleSearch(event)} /> +
+
+
+
+
+ + {settingList.map(menu => { + const rawKey = menu.name + menu.caption; + if (rawKey.toLowerCase().indexOf(keyword) === -1) { + return false; + } + return ( + + + + ); + })} + +
+ +
+ ); + } +} + +Settings.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(Settings); diff --git a/front/odiparpack/app/containers/Pages/Settings/settings-jss.js b/front/odiparpack/app/containers/Pages/Settings/settings-jss.js new file mode 100644 index 0000000..5424d4e --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Settings/settings-jss.js @@ -0,0 +1,87 @@ +const styles = theme => ({ + appBar: { + position: 'relative', + }, + flex: { + flex: 1, + }, + title: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + color: theme.palette.common.white, + }, + searchSettings: { + marginBottom: theme.spacing(4), + }, + wrapper: { + fontFamily: theme.typography.fontFamily, + position: 'relative', + marginRight: theme.spacing(2), + marginLeft: theme.spacing(1), + borderRadius: 2, + display: 'block', + }, + search: { + width: 'auto', + height: '100%', + position: 'absolute', + pointerEvents: 'none', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + }, + input: { + font: 'inherit', + padding: `${theme.spacing(1)}px ${theme.spacing(1)}px ${theme.spacing(1)}px ${theme.spacing(4)}px`, + border: 0, + display: 'block', + verticalAlign: 'middle', + whiteSpace: 'normal', + background: 'none', + margin: 0, // Reset for Safari + color: 'inherit', + width: '100%', + '&:focus': { + outline: 0, + }, + }, + iconTitle: { + position: 'relative', + marginRight: theme.spacing(0.5), + }, + button: { + display: 'block', + width: '100%', + background: theme.palette.grey[50], + '&:hover': { + background: theme.palette.secondary.light + }, + '& $icon': { + margin: '0 auto', + display: 'block', + fontSize: 64 + }, + '& $info': { + display: 'block', + textTransform: 'none', + color: theme.palette.grey[500] + } + }, + info: {}, + icon: {}, + formControl: { + margin: theme.spacing(1), + minWidth: 120, + }, + selectEmpty: { + marginTop: theme.spacing(2), + }, + iconSmall: { + fontSize: 20, + }, + leftIcon: { + marginRight: theme.spacing(1), + }, +}); + +export default styles; diff --git a/front/odiparpack/app/containers/Pages/SocialMedia/index.js b/front/odiparpack/app/containers/Pages/SocialMedia/index.js new file mode 100644 index 0000000..3a5ae2c --- /dev/null +++ b/front/odiparpack/app/containers/Pages/SocialMedia/index.js @@ -0,0 +1,110 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { bindActionCreators } from 'redux'; +import { connect } from 'react-redux'; +import data from 'ba-api/timelineData'; +import { + fetchAction, + postAction, + toggleLikeAction, + fetchCommentAction, + postCommentAction, + closeNotifAction +} from 'ba-actions/SocmedActions'; +import { Timeline, WritePost, SideSection, Notification } from 'ba-components'; +import { Grid } from '@material-ui/core'; + +class SocialMedia extends React.Component { + componentDidMount() { + this.props.fetchData(data); + } + + render() { + const title = brand.name + ' - Social Media'; + const description = brand.desc; + const { + dataProps, + submitPost, + submitLike, + submitComment, + fetchComment, + commentIndex, + closeNotif, + messageNotif, + } = this.props; + return ( +
+ + {title} + + + + + + + closeNotif()} message={messageNotif} /> + + +
+ + +
+
+ + + +
+
+ ); + } +} + +SocialMedia.propTypes = { + fetchData: PropTypes.func.isRequired, + submitPost: PropTypes.func.isRequired, + submitLike: PropTypes.func.isRequired, + submitComment: PropTypes.func.isRequired, + dataProps: PropTypes.object.isRequired, + fetchComment: PropTypes.func.isRequired, + commentIndex: PropTypes.number.isRequired, + closeNotif: PropTypes.func.isRequired, + messageNotif: PropTypes.string.isRequired, +}; + +const reducer = 'socmed'; +const mapStateToProps = state => ({ + force: state, // force state from reducer + dataProps: state.getIn([reducer, 'dataTimeline']), + commentIndex: state.getIn([reducer, 'commentIndex']), + messageNotif: state.getIn([reducer, 'notifMsg']), +}); + +const constDispatchToProps = dispatch => ({ + fetchData: bindActionCreators(fetchAction, dispatch), + submitPost: bindActionCreators(postAction, dispatch), + submitComment: bindActionCreators(postCommentAction, dispatch), + submitLike: bindActionCreators(toggleLikeAction, dispatch), + fetchComment: bindActionCreators(fetchCommentAction, dispatch), + closeNotif: () => dispatch(closeNotifAction), +}); + +const SocialMediaMapped = connect( + mapStateToProps, + constDispatchToProps +)(SocialMedia); + +export default SocialMediaMapped; diff --git a/front/odiparpack/app/containers/Pages/Standalone/LoginDedicated.js b/front/odiparpack/app/containers/Pages/Standalone/LoginDedicated.js new file mode 100644 index 0000000..9cba8fb --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Standalone/LoginDedicated.js @@ -0,0 +1,33 @@ +import React from 'react'; +import { PropTypes } from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import brand from 'ba-api/brand'; +import logo from 'ba-images/logo.svg'; +import styles from 'ba-containers/Templates/appStyles-jss'; +import { Hidden } from '@material-ui/core'; +import Login from '../Users/Login'; + +class LoginDedicated extends React.Component { + render() { + const { classes } = this.props; + return ( +
+
+ +
+ {brand.name} +

{brand.name}

+
+
+ +
+
+ ); + } +} + +LoginDedicated.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default (withStyles(styles)(LoginDedicated)); diff --git a/front/odiparpack/app/containers/Pages/Standalone/NotFoundDedicated.js b/front/odiparpack/app/containers/Pages/Standalone/NotFoundDedicated.js new file mode 100644 index 0000000..3d78b32 --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Standalone/NotFoundDedicated.js @@ -0,0 +1,24 @@ +import React from 'react'; +import { PropTypes } from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import styles from 'ba-containers/Templates/appStyles-jss'; +import Error from './../Error'; + +class NotFoundDedicated extends React.Component { + render() { + const { classes } = this.props; + return ( +
+
+ +
+
+ ); + } +} + +NotFoundDedicated.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default (withStyles(styles)(NotFoundDedicated)); diff --git a/front/odiparpack/app/containers/Pages/UserProfile/index.js b/front/odiparpack/app/containers/Pages/UserProfile/index.js new file mode 100644 index 0000000..2065f68 --- /dev/null +++ b/front/odiparpack/app/containers/Pages/UserProfile/index.js @@ -0,0 +1,131 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import dummy from 'ba-api/dummyContents'; +import AccountCircle from '@material-ui/icons/AccountCircle'; +import SupervisorAccount from '@material-ui/icons/SupervisorAccount'; +import Favorite from '@material-ui/icons/Favorite'; +import PhotoLibrary from '@material-ui/icons/PhotoLibrary'; +import { bindActionCreators } from 'redux'; +import { connect } from 'react-redux'; +import data from 'ba-api/timelineData'; +import { fetchAction } from 'ba-actions/SocmedActions'; +import { + Cover, + About, + Connection, + Favorites, + Albums +} from 'ba-components'; + +import { AppBar, Tabs, Tab, Hidden } from '@material-ui/core'; + +function TabContainer(props) { + return ( +
+ {props.children} +
+ ); +} + +TabContainer.propTypes = { + children: PropTypes.node.isRequired, +}; + +class UserProfile extends React.Component { + state = { + value: 0, + }; + + componentDidMount() { + this.props.fetchData(data); + } + + handleChange = (event, value) => { + this.setState({ value }); + }; + + render() { + const title = brand.name + ' - Profile'; + const description = brand.desc; + const { dataProps } = this.props; + const { value } = this.state; + return ( +
+ + {title} + + + + + + + + + + + } /> + } /> + } /> + } /> + + + + + } label="ABOUT" /> + } label="20 CONNECTIONS" /> + } label="18 FAVORITES" /> + } label="4 ALBUMS" /> + + + + {value === 0 && } + {value === 1 && } + {value === 2 && } + {value === 3 && } +
+ ); + } +} + +UserProfile.propTypes = { + dataProps: PropTypes.object.isRequired, + fetchData: PropTypes.func.isRequired, +}; + +const reducer = 'socmed'; +const mapStateToProps = state => ({ + force: state, // force state from reducer + dataProps: state.getIn([reducer, 'dataTimeline']) +}); + +const constDispatchToProps = dispatch => ({ + fetchData: bindActionCreators(fetchAction, dispatch) +}); + +const UserProfileMapped = connect( + mapStateToProps, + constDispatchToProps +)(UserProfile); + +export default UserProfileMapped; diff --git a/front/odiparpack/app/containers/Pages/Users/LockScreen.js b/front/odiparpack/app/containers/Pages/Users/LockScreen.js new file mode 100644 index 0000000..2752ae6 --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Users/LockScreen.js @@ -0,0 +1,55 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { LockForm } from 'ba-components'; +import styles from 'ba-components/Forms/user-jss'; +import { Grid } from '@material-ui/core'; + +class ResetPassword extends React.Component { + state = { + valueForm: [] + } + + submitForm(values) { + setTimeout(() => { + this.setState({ valueForm: values }); + console.log(`You submitted:\n\n${this.state.valueForm}`); + window.location.href = '/app'; + }, 500); // simulate server latency + } + + render() { + const title = brand.name + ' - Lock Screen'; + const description = brand.desc; + const { classes } = this.props; + return ( +
+ + {title} + + + + + + +
+ + + {/* ----------------------------------------------------------------------*/} + {/* Load Login Form */} + this.submitForm(values)} /> + + +
+
+ ); + } +} + +ResetPassword.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(ResetPassword); diff --git a/front/odiparpack/app/containers/Pages/Users/Login.js b/front/odiparpack/app/containers/Pages/Users/Login.js new file mode 100644 index 0000000..300f7b4 --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Users/Login.js @@ -0,0 +1,85 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import Type from 'ba-styles/Typography.scss'; +import ArrowForward from '@material-ui/icons/ArrowForward'; +import logo from 'ba-images/logo.svg'; +import { LoginForm } from 'ba-components'; +import styles from 'ba-components/Forms/user-jss'; + +import { Grid, Hidden, Typography } from '@material-ui/core'; + +class Login extends React.Component { + state = { + valueForm: [] + } + + submitForm(values) { + setTimeout(() => { + this.setState({ valueForm: values }); + console.log(`You submitted:\n\n${this.state.valueForm}`); + window.location.href = '/app'; + }, 500); // simulate server latency + } + + render() { + const title = brand.name + ' - Login'; + const description = brand.desc; + const { classes } = this.props; + return ( +
+ + {title} + + + + + + +
+ + + + + {/* Welcome Login */} +
+
+
+ {brand.name} +

{brand.name}

+
+ + Hello there, + + + + welcome to + {' '} + {brand.name} + + +
+ +
+
+
+ + {/* ----------------------------------------------------------------------*/} + {/* Load Login Form */} + this.submitForm(values)} /> + +
+
+
+
+ ); + } +} + +Login.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(Login); diff --git a/front/odiparpack/app/containers/Pages/Users/Register.js b/front/odiparpack/app/containers/Pages/Users/Register.js new file mode 100644 index 0000000..c139068 --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Users/Register.js @@ -0,0 +1,78 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import Type from 'ba-styles/Typography.scss'; +import ArrowForward from '@material-ui/icons/ArrowForward'; +import brand from 'ba-api/brand'; +import logo from 'ba-images/logo.svg'; +import { RegisterForm } from 'ba-components'; +import styles from 'ba-components/Forms/user-jss'; + +import { Grid, Hidden, Typography } from '@material-ui/core'; + +class Login extends React.Component { + state = { + valueForm: [] + } + + submitForm(values) { + setTimeout(() => { + this.setState({ valueForm: values }); + console.log(`You submitted:\n\n${this.state.valueForm}`); + window.location.href = '/app'; + }, 500); // simulate server latency + } + + render() { + const title = brand.name + ' - Register'; + const description = brand.desc; + const { classes } = this.props; + return ( +
+ + {title} + + + + + + +
+ + + + + {/* Welcome Login */} +
+
+
+ {brand.name} +

{brand.name}

+
+ + Nice to meet You :) + +
+ +
+
+
+ + {/* ----------------------------------------------------------------------*/} + {/* Load Register Form */} + this.submitForm(values)} /> + +
+
+
+
+ ); + } +} + +Login.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(Login); diff --git a/front/odiparpack/app/containers/Pages/Users/ResetPassword.js b/front/odiparpack/app/containers/Pages/Users/ResetPassword.js new file mode 100644 index 0000000..e80253d --- /dev/null +++ b/front/odiparpack/app/containers/Pages/Users/ResetPassword.js @@ -0,0 +1,54 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { ResetForm } from 'ba-components'; +import styles from 'ba-components/Forms/user-jss'; +import { Grid } from '@material-ui/core'; + +class ResetPassword extends React.Component { + state = { + valueForm: [] + } + + submitForm(values) { + setTimeout(() => { + this.setState({ valueForm: values }); + console.log(`You submitted:\n\n${this.state.valueForm}`); + }, 500); // simulate server latency + } + + render() { + const title = brand.name + ' - Reset Password'; + const description = brand.desc; + const { classes } = this.props; + return ( +
+ + {title} + + + + + + +
+ + + {/* ----------------------------------------------------------------------*/} + {/* Load Login Form */} + this.submitForm(values)} /> + + +
+
+ ); + } +} + +ResetPassword.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(ResetPassword); -- cgit v1.2.3