├── .gitignore ├── README.md ├── app ├── app.js ├── components │ ├── Employee.js │ ├── Main.js │ ├── Manager.js │ ├── children │ │ ├── AnnouncementsBuild.js │ │ ├── AnnouncementsView.js │ │ ├── EmployeeHome.js │ │ ├── Login.js │ │ ├── ManagerEmployeeAll.js │ │ ├── ManagerHome.js │ │ ├── ManagerSchedulesCreate.js │ │ ├── Register.js │ │ └── ScheduleView.js │ └── utils │ │ └── helpers.js └── config │ └── routes.js ├── controllers └── db_controller.js ├── db └── db.js ├── models ├── announcements.js ├── employee.js ├── employeeSchedule.js └── user.js ├── package-lock.json ├── package.json ├── public ├── 404.html ├── assets │ ├── images │ │ ├── favicon.ico │ │ ├── logo-small.png │ │ └── logo.png │ ├── javascript.js │ └── style.css ├── error.html ├── index.html └── notauth.html ├── server.js └── webpack.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | public/bundle.js 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #  Schedulr 2 | Schedulr is an employee management and scheduling app that allows… 3 | * Managers to manage and schedule employees 4 | * Employees to view work schedules 5 | 6 | View app live on [Heroku](https://reactschedulr.herokuapp.com) 7 | 8 | ## Run locally 9 | 10 | Schedulr requires [Node.js](https://nodejs.org/) and [MongoDB](https://docs.mongodb.com/manual/installation/) to run 11 | 12 | ### Installation 13 | Once mongo is installed, open a new terminal and run 14 | 15 | 16 | `$ mongod` 17 | 18 | Open another terminal window and navigate to project directory and run 19 | 20 | `$ npm install` 21 | 22 | Create a .env file with and add the code below (not strings) 23 | 24 | ``` 25 | GOOGLE_CLIENT_ID= 26 | GOOGLE_CLIENT_SECRET= 27 | GOOGLE_CALLBACK_URL=http://YOUR_DOMAIN/auth/google/callback 28 | 29 | LINKEDIN_ID= 30 | LINKEDIN_SECRET= 31 | LINKEDIN_CALLBACK=http://YOUR_DOMAIN/auth/linkedin/callback 32 | ``` 33 | 34 | If you dont want to go through the trouble of creating the API keys, put in dummy numbers/text and the app should still work, however passport social login will not. 35 | 36 | ### Run App 37 | 38 | `$ npm run build` 39 | 40 | Wait for webpack to bundle then 41 | 42 | `$ npm start` 43 | 44 | 45 | Open a browser and go to [http://localhost:8080](http://localhost:8080) 46 | 47 | ## Team 48 | * Andrea Roche [@amr08](https://github.com/amr08) 49 | * Christi Savino [@clsavino](https://github.com/clsavino) 50 | * Houston Breedlove [@hcbreedl](https://github.com/hcbreedl) 51 | * Nicolás Cáceres [@mr-attack](https://github.com/mr-attack) 52 | 53 | ## Tech 54 | Built with React, Node, Express, MongoDB, Passport.js -------------------------------------------------------------------------------- /app/app.js: -------------------------------------------------------------------------------- 1 | var React = require("react"); 2 | var ReactDOM = require("react-dom"); 3 | var routes = require("./config/routes"); 4 | 5 | ReactDOM.render(routes, document.getElementById("app")); -------------------------------------------------------------------------------- /app/components/Employee.js: -------------------------------------------------------------------------------- 1 | var React = require("react"); 2 | var helpers = require("./utils/helpers"); 3 | 4 | var Employee = React.createClass({ 5 | 6 | getInitialState: function() { 7 | return { 8 | username: "", 9 | picture: "" 10 | }; 11 | }, 12 | 13 | componentDidMount: function() { 14 | helpers.getCurrentUser().then(function(response) { 15 | if (response !== this.state.username) { 16 | this.setState({ picture: response.data.picture, username: response.data.username }); 17 | } 18 | }.bind(this)); 19 | }, 20 | 21 | render: function() { 22 | return ( 23 |
{this.props.content}
17 | {/*{this.state.content}
*/} 18 |Employees | 145 |
---|
150 | New Employeeadd 151 | | 152 |
157 | {ManagerEmployeeAll.firstName} {ManagerEmployeeAll.lastName} 158 | | 159 |
Name | 98 |Mon | 99 |Tues | 100 |Wed | 101 |Thurs | 102 |Fri | 103 |Sat | 104 |Sun | 105 |||
---|---|---|---|---|---|---|---|---|---|
112 | {schedules.firstName} {schedules.lastName} 113 | | 114 |
115 |
116 |
127 |
128 | |
129 |
130 |
131 |
142 |
143 | |
144 |
145 |
146 |
157 |
158 | |
159 |
160 |
161 |
172 |
173 | |
174 |
175 |
176 |
187 |
188 | |
189 |
190 |
191 |
202 |
203 | |
204 |
205 |
206 |
217 |
218 | |
219 | 220 | 221 | | 222 |223 | 224 | | 225 |
Name | 30 |Mon | 31 |Tues | 32 |Wed | 33 |Thurs | 34 |Fri | 35 |Sat | 36 |Sun | 37 |
---|---|---|---|---|---|---|---|
44 | {schedules.firstName} {schedules.lastName} 45 | | 46 |47 | {schedules.monday} 48 | | 49 |50 | {schedules.tuesday} 51 | | 52 |53 | {schedules.wednesday} 54 | | 55 |56 | {schedules.thursday} 57 | | 58 |59 | {schedules.friday} 60 | | 61 |62 | {schedules.saturday} 63 | | 64 |65 | {schedules.sunday} 66 | | 67 |