Skip to content

Commit

Permalink
meeting app
Browse files Browse the repository at this point in the history
  • Loading branch information
MAfzalKhan1997 committed Nov 23, 2018
1 parent ac2743c commit 35a8b5f
Show file tree
Hide file tree
Showing 14 changed files with 161 additions and 60 deletions.
44 changes: 44 additions & 0 deletions .firebase/hosting.YnVpbGQ.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
asset-manifest.json,1542975421088,e1bd56b2c0e0dcd3c829fbfec3e2eebf7b2c30f207eaf191a84d0f64d4e8aa22
favicon.ico,1542974159835,e78b5ea2565e67fcc3fa56362d9684feec76637629f302111358cf3a6212a852
favicon2.ico,499162500000,eae62e993eb980ec8a25058c39d5a51feab118bd2100c4deebb2a9c158ec11f9
index.html,1542975421112,68a3323aec20b0520f0f5daebefbd3c03b2c1785e9d2adc721f9cc80a03d726f
manifest.json,1542975036133,e4fd7d6121b74e011d9a0e1d4f27e47341e9095d411cec1a2499c8e5fc5f675b
precache-manifest.a752e7fe1945af58a5fca093c75a042e.js,1542975421151,54741896b6a178c8516ff0efa77d2d292c149be49a000ffe15b9f8933d68aa32
firebase-messaging-sw.js,1542456949660,54e13ac74f0e7a3fa7ef51a84673b1e1ce9a1efd8953cfbc9587feea536a7e9a
service-worker.js,1542975421062,4ae1e007bb8a6e8a06fbddcd8d75c759e81cf7e0370c6ed47773208a7eb87ad2
static/css/main.07d1e409.chunk.css,1542975421236,ec52e11c631a0913899e24d099c393b05613bb6d8bbf0c5efa8c09d204fc6745
static/css/1.7f6acf8c.chunk.css,1542975421251,4912fddfc68433258e8a083484966ecaefe1bb9d8ee26d0b5cf554390a6f7681
static/css/main.07d1e409.chunk.css.map,1542975421254,85123711453a44a985d8d2e69e3ffb6c4a2d0acc3073202828a65debfa95ae07
static/js/runtime~main.229c360f.js,1542975421251,ab5376373c807026cbc526472fc3bc8437bb715f3910901999f6490677d6d80d
static/js/runtime~main.229c360f.js.map,1542975421251,f092edadbcfee2238da38064cd923f3e9a888c7b738e7698543084ac7353510f
static/media/roboto-latin-100.987b8457.woff2,1542975421071,5b5bb65fdc29391eacb290a2ec71048895c87fb8cc447a787606fb401babbb33
static/media/roboto-latin-300.55536c8e.woff2,1542975421243,18811036eee492aef74606ad426d0d111365cfdd3fcf23a4e3527d23b6b6142b
static/css/1.7f6acf8c.chunk.css.map,1542975421251,79bcbe90cc82a9d877ca22e98d2136095671f52ba9c054258774d23b1e790aef
static/media/roboto-latin-400.5d4aeb4e.woff2,1542975421250,053122ffb6c2b8ce0e6131c8813c535c9ba620a6badc08e6db9e5c87b9c6a7cf
static/media/roboto-latin-500.28546717.woff2,1542975421249,df2f570d5bf59396409d186a09a021ae2cb82e6ea49f76eec8c1296e8d1cef4f
static/media/roboto-latin-700.037d8304.woff2,1542975421249,9b9a3676dab605ca0378a2313ec4de66a2715c054dc3197cc756ee2a6c4f8d1e
static/media/roboto-latin-900.19b7a0ad.woff2,1542975421250,79a000bafbcf458e47c75908a448976d020fff0a49214a994c7e1fd1ccf7cf1c
static/js/main.446ef2eb.chunk.js,1542975421240,353b8a1043584160b2eec4f5d04b3656c8a0365d02a2261299462adcb5f4dff7
static/media/roboto-latin-100italic.6232f43d.woff2,1542975421248,ea723b63f5306b2bf5f2e6dc28d69506ccf2307ccf6fdeb7b1c8ad697d711197
static/media/roboto-latin-100.e9dbbe8a.woff,1542975421242,9c695075709aad2852f3b17a0d0d73661afe42fc8385cdbb6afc65d72720cc94
static/media/roboto-latin-400.bafb105b.woff,1542975421247,951acd5d24cfae460f1ca030e88d36badc8223695f75baac24149de3f392b1d8
static/media/roboto-latin-300italic.d69924b9.woff2,1542975421246,c912904bc61591fc6d1417f16427013f2c043dd1473ef45ef4d6c34e5b5146e2
static/media/roboto-latin-300.a1471d1d.woff,1542975421244,a096593d88286f6676c85fd0859444f258b481cf47b6c1532912a96298c1e531
static/media/roboto-latin-500italic.510dec37.woff2,1542975421253,8e6fd3dd809b4e1417c44a756d5f41aa3d01113dfd64e393db4167bc1f117b47
static/media/roboto-latin-400italic.d8bcbe72.woff2,1542975421251,59e9f3b0000e295ebe0597eec669bddb86e546241c931c69bf2466aad186ec51
static/media/roboto-latin-500italic.ffcc050b.woff,1542975421249,e24ab61785c2cac7e17c59ba0ff0d0f05f83ae811795c50eee47d59c8a131edd
static/media/roboto-latin-400italic.9680d5a0.woff,1542975421251,6cc3add40534a271a8d5b28abd3b0405d664ac4a866f4bf637a37ed062f9f411
static/media/roboto-latin-300italic.210a7c78.woff,1542975421245,5d627732a3d903197f70f0f9911b1f82ea4f004cab691330c59ff597442db937
static/media/roboto-latin-700.cf6613d1.woff,1542975421257,30df2031db4c02c8a2077f01e8fd14475da003232a7e881a4ac696b0f204c729
static/media/roboto-latin-700italic.010c1aee.woff2,1542975421250,cf71e80902058379e0edef4a93203c0e4171ae2ee0ff7bed8885fa2012c03726
static/media/roboto-latin-900.8c2ade50.woff,1542975421250,825cad974adb51209c6828415a47459b7263970c6182f84557fba38a429a9303
static/media/roboto-latin-700italic.846d1890.woff,1542975421250,4388b12881c334947c86ae88fc7425eedc20a9bc67ebb0c2049cb02cbbf0a008
static/media/roboto-latin-500.de8b7431.woff,1542975421251,d00601e6ce15870510b0a2dfbbdbaeb5bc2400bab1af1b1b01924db7d817dfae
meetup.png,1542973905399,894465b6a31a1b45db7337e369965e984e1c53226904189632cd76aec096aa30
static/media/handshake.7dc24f7d.png,1542975421250,894465b6a31a1b45db7337e369965e984e1c53226904189632cd76aec096aa30
static/media/roboto-latin-100italic.d704bb3d.woff,1542975421258,69c56b67d78fc20c172cf79d45d2a917e5fa955de6322f046c43f05e5c8de13b
static/media/roboto-latin-900italic.7b770d6c.woff2,1542975421250,a342e0faba62c55cf30438225be986cbfc0cf2bb663c9cce48599339a09c2eb3
static/js/main.446ef2eb.chunk.js.map,1542975421379,4d839727cb7a6653bf2cf6e5c1afbd4bd20009edeaf3ecd3b919c5df54e40317
static/media/roboto-latin-900italic.bc833e72.woff,1542975421250,897b8eced1238cfe4b53e9ff3c76321d4f734a42346b35a01f0b32937a679966
static/js/1.0afb8914.chunk.js,1542975421251,59fdc66b3dc90f78766ec68b67694658d86f7b692206f5c34848cb7cac77d8a2
static/js/1.0afb8914.chunk.js.map,1542975421257,d2551fc6c911cedd70b4b60155d2ecbf57df7d9200e3181cd8cbfc1f1fc9c938
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "meetup-mak"
}
}
16 changes: 16 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
Binary file modified public/favicon.ico
Binary file not shown.
Binary file added public/favicon2.ico
Binary file not shown.
42 changes: 23 additions & 19 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--

<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<!--
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Expand All @@ -20,14 +22,15 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
<title>MeeTup</title>
</head>

<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand All @@ -37,5 +40,6 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
</body>

</html>
12 changes: 6 additions & 6 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"short_name": "MeeTup",
"name": "Let's meet with MeeTup",
"icons": [
{
"src": "favicon.ico",
"src": "meetup.png",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
"type": "image/png"
}
],
"start_url": ".",
"start_url": "./dashboard",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
}
Binary file added public/meetup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 40 additions & 13 deletions src/Components/AppBar/AppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ import Dialog from '@material-ui/core/Dialog';
import CloseIcon from '@material-ui/icons/Close';
import Slide from '@material-ui/core/Slide';

import FaceIcon from '@material-ui/icons/FaceOutlined';

const styles = theme => ({
root: {
flexGrow: 1,
Expand Down Expand Up @@ -106,6 +108,18 @@ const styles = theme => ({
appBar: {
position: 'relative',
},

avatar: {
width: 60,
height: 60,
top: 60,
left: 10
},
drawerText: {
paddingLeft: '10px',
// backgroundColor: '#e0f2f111',
color: "white"
}
});

function Transition(props) {
Expand Down Expand Up @@ -263,15 +277,28 @@ class MyAppBar extends React.Component {
const { anchorEl, userAvail, myProps, notificationObj, destination, userProfile } = this.state;
const open = Boolean(anchorEl);

const icons1 = [<DashboardIcon />];
const func1 = [() => this.props.history.push('/dashboard')];
const icons1 = [<DashboardIcon />, <FaceIcon />];
const func1 = [
() => this.props.history.push('/dashboard'),
() => this.props.history.push('/my_profile')
];
const icons2 = [<InboxIcon />, <StarIcon />, <SendIcon />];
const icons3 = [<DeleteIcon />, <ErrorIcon />];

const sideList = (
<div className={classes.list}>
<div style={{ width: "100%", height: "200px", backgroundImage: `url(${require("../../Images/back.jpg")})`, backgroundRepeat: 'no-repeat', backgroundSize: "cover" }}>
<span>
<Avatar src={userAvail.photoURL} className={classes.avatar} alt="Profile Picture" />
<br />
<br />
<br />
<Typography className={classes.drawerText} variant='overline'>{userAvail.displayName}</Typography>
<Typography className={classes.drawerText} variant='body2'>{userAvail.email}</Typography>
</span>
</div>
<List>
{['Dashboard'].map((text, index) => (
{['Dashboard', 'Profile'].map((text, index) => (
<ListItem button onClick={func1[index]} key={text}>
<ListItemIcon>{icons1[index]}</ListItemIcon>
<ListItemText primary={text} />
Expand Down Expand Up @@ -299,16 +326,16 @@ class MyAppBar extends React.Component {
</div>
);

let meetingTime = notificationObj.selectedDate
// console.log(value.nickName1, meetingTime)
let nowTime = new Date()
// console.log(nowTime)
let timeDiff = moment(nowTime).diff(meetingTime);
console.log('request', timeDiff)
// if(timeDiff > 0 && value.status === 'PENDING' ){
// this.setMeeting(value, index, 'CANCELLED')
// }
let meetingTime = notificationObj.selectedDate
// console.log(value.nickName1, meetingTime)
let nowTime = new Date()
// console.log(nowTime)
let timeDiff = moment(nowTime).diff(meetingTime);
console.log('request', timeDiff)

// if(timeDiff > 0 && value.status === 'PENDING' ){
// this.setMeeting(value, index, 'CANCELLED')
// }

return (
<div className={classes.root}>
Expand Down
37 changes: 19 additions & 18 deletions src/Components/LocSearch/LocSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,45 +118,45 @@ class LocSearch extends Component {

let duration = myProfile.mins.filter(mins => userProfile.mins.includes(mins));
console.log('duration', duration)


firebase.database().ref(`meetingsArea/${myProfile.uid}/meetingsSec/${userProfile.uid}`).once('value', (data) => {

console.log(data.val());
let user = data.val();

if (user === null) {

const userObj = {
displayName: userProfile.displayName,
avatarURL: userProfile.avatarURL[0],
contact: userProfile.contact,
email: userProfile.email,
}

firebase.database().ref("/").child(`meetingsArea/${myProfile.uid}/meetingsSec/${userProfile.uid}`).set(userObj)
}


var newPostKey = firebase.database().ref().child(`meetingsArea/${myProfile.uid}/meetingsSec/${userProfile.uid}/meetings`).push().key;

const meetingDetails = {
displayName1: myProfile.displayName,
nickName1: myProfile.nickName,
avatarURL1: myProfile.avatarURL,
contact1: myProfile.contact,
email1: myProfile.email,
uid1: myProfile.uid,
postStatus1:'null',
postStatus1: 'null',

displayName2: userProfile.displayName,
nickName2: userProfile.nickName,
avatarURL2: userProfile.avatarURL,
contact2: userProfile.contact,
email2: userProfile.email,
uid2: userProfile.uid,
postStatus2:'null',
postStatus2: 'null',

status: 'PENDING',
selectedDate: selectedDate.toLocaleString('en-us', options),
selectedLoc,
Expand Down Expand Up @@ -186,11 +186,12 @@ class LocSearch extends Component {
dataType: 'json',
data: JSON.stringify({
"to": token.key, "notification": {
"title": `New Request From ${myProfile.displayName}`,
"body": "You have a new meeting request",
"icon": "https://firebasestorage.googleapis.com/v0/b/tinder-shinder-2.appspot.com/o/Notifications.png?alt=media&token=b4c86061-9644-4faa-a316-6461be0fe421", //Photo of sender
// "click_action": `https://meetup-mak.firebaseapp.com/dashboard`,
"click_action": `/dashboard`,
"title": `${myProfile.displayName}`,
"body": "Sent you a meeting request",
// "icon": "https://firebasestorage.googleapis.com/v0/b/tinder-shinder-2.appspot.com/o/Notifications.png?alt=media&token=b4c86061-9644-4faa-a316-6461be0fe421", //Photo of sender
"icon": `${myProfile.avatarURL[0]}`, //Photo of sender
"click_action": `https://meetup-mak.firebaseapp.com/dashboard`,
// "click_action": `/dashboard`,
"myObject": JSON.stringify(meetingDetails)
}
}),
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Login/Login.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
right: 0;
bottom: 0;
left: 0;
height: 200px;
height: 250px;
max-width:450px;
width: 95% ;
border-radius: 5px;
Expand Down
10 changes: 7 additions & 3 deletions src/Components/Login/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,20 @@ class Login extends Component {
return (
<center>
<div className='mainDiv'>

<br/>
<img
src={require("../../Images/handshake.png")}
alt='meetup'
width='65px'
height='62px'
/>
<FormControl className="formDiv">

<Typography variant="h4" >
MeeTup
</Typography>
<br />
<br />
<br />
<br />
<Typography color='primary' variant="subheading" >
Get Started with FaceBook
</Typography>
Expand Down
Binary file added src/Images/back.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Images/handshake.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 35a8b5f

Please sign in to comment.