├── .vscode └── settings.json ├── README.md ├── src ├── utils.js ├── css │ ├── group-team-card.css │ ├── group-post-card.css │ └── group.css ├── reducers │ ├── groupList.js │ ├── socialList.js │ ├── countryList.js │ ├── index.js │ ├── activeGroupPost.js │ ├── groupTeam.js │ └── activeGroup.js ├── components │ ├── empty-group-team-list.js │ ├── empty-group-team.js │ ├── group-detail.js │ ├── group-about.js │ ├── group-list.js │ ├── app.js │ ├── group-post-list.js │ ├── group-team.js │ ├── empty-group-detail.js │ ├── group-post-card.js │ ├── purpose-card.js │ ├── group-add-post.js │ ├── add-member.js │ ├── location-card.js │ ├── group-branding.js │ ├── group-team-list.js │ └── edit-branding.js ├── fields │ └── index.js ├── index.js ├── urls.js └── actions │ └── index.js ├── config.json ├── .gitignore └── LICENSE /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Groups 2 | 3 | > Omniport service frontend 4 | -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- 1 | export function errorExist (errorObject, field) { 2 | return Boolean( 3 | Object.keys(errorObject).find(x => { 4 | return x === field 5 | }) 6 | ) 7 | } 8 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "nomenclature": { 3 | "name": "groups", 4 | "verboseName": "Groups" 5 | }, 6 | "baseUrl": "/groups", 7 | "source": "groups/src/index", 8 | "primarySidebar": { 9 | "icon": "group", 10 | "priority": 4 11 | } 12 | } -------------------------------------------------------------------------------- /src/css/group-team-card.css: -------------------------------------------------------------------------------- 1 | .team-card-container{ 2 | display: flex; 3 | align-items: center; 4 | } 5 | .user-image-container{ 6 | width: 2em; 7 | height: 2em; 8 | margin-right: 1em; 9 | } 10 | .user-image-container img{ 11 | border-radius: 9999em; /* Infinity */ 12 | } 13 | .user-desc{} -------------------------------------------------------------------------------- /src/reducers/groupList.js: -------------------------------------------------------------------------------- 1 | const initialState = { 2 | isLoaded: false 3 | } 4 | const groupList = (state = initialState, action) => { 5 | switch (action.type) { 6 | case 'SET_GROUPLIST': 7 | return action.payload 8 | default: 9 | return state 10 | } 11 | } 12 | 13 | export default groupList 14 | -------------------------------------------------------------------------------- /src/reducers/socialList.js: -------------------------------------------------------------------------------- 1 | const initialState = { 2 | isLoaded: false, 3 | data: [] 4 | } 5 | const socialList = (state = initialState, action) => { 6 | switch (action.type) { 7 | case 'SET_SOCIALLIST': 8 | return action.payload 9 | default: 10 | return state 11 | } 12 | } 13 | 14 | export default socialList 15 | -------------------------------------------------------------------------------- /src/reducers/countryList.js: -------------------------------------------------------------------------------- 1 | const initialState = { 2 | isLoaded: false, 3 | data: [] 4 | } 5 | const countryList = (state = initialState, action) => { 6 | switch (action.type) { 7 | case 'SET_COUNTRYLIST': 8 | return action.payload 9 | default: 10 | return state 11 | } 12 | } 13 | 14 | export default countryList 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | 23 | .idea 24 | -------------------------------------------------------------------------------- /src/reducers/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux' 2 | import GroupList from './groupList' 3 | import CountryList from './countryList' 4 | import SocialList from './socialList' 5 | import ActiveGroup from './activeGroup' 6 | import ActiveGroupPost from './activeGroupPost' 7 | import GroupTeam from './groupTeam' 8 | 9 | const rootReducers = combineReducers({ 10 | groupList: GroupList, 11 | activeGroup: ActiveGroup, 12 | countryList: CountryList, 13 | socialList: SocialList, 14 | activeGroupPost: ActiveGroupPost, 15 | groupTeam: GroupTeam 16 | }) 17 | 18 | export default rootReducers 19 | -------------------------------------------------------------------------------- /src/components/empty-group-team-list.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Card, Placeholder, Segment } from 'semantic-ui-react' 3 | 4 | export default class EmptyGroupTeamList extends React.Component { 5 | render () { 6 | return ( 7 | 8 | {[...Array(6)].map((item, index) => { 9 | return ( 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | ) 21 | })} 22 | 23 | ) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/css/group-post-card.css: -------------------------------------------------------------------------------- 1 | .post-header{ 2 | display: flex; 3 | } 4 | .post-user{ 5 | display: flex; 6 | flex-grow: 1; 7 | } 8 | .post-user-pic{ 9 | display: flex; 10 | flex-direction: column; 11 | justify-content: center; 12 | margin-right: 1em; 13 | } 14 | .post-user-desc{ 15 | display: flex; 16 | flex-direction: column; 17 | align-items: flex-start; 18 | flex-grow: 1; 19 | } 20 | .post-user-name{ 21 | font-size: 1em; 22 | font-weight: 700; 23 | color: rgba(0,0,0,.87); 24 | } 25 | .post-card-image-container{ 26 | text-align: center; 27 | margin-top: 1em; 28 | } 29 | .post-card-image{ 30 | object-fit: contain; 31 | max-height: 30em; 32 | 33 | } 34 | .post-card-description{ 35 | text-align: left; 36 | white-space: pre-wrap; 37 | } 38 | .post-app-container{ 39 | text-align: left; 40 | } 41 | .post-card-app-icon{ 42 | font-size: 16px 43 | } -------------------------------------------------------------------------------- /src/fields/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | import { TextArea } from 'semantic-ui-react' 4 | 5 | import { Editor } from '@tinymce/tinymce-react' 6 | 7 | export const RTField = props => ( 8 | 25 | ) 26 | 27 | export const Textfield = props => ( 28 |