If you're looking for an application that will assist with managing shifts, then you have come to the right place.
Employees can use the application to select shifts for the days on which they will be available to work, or for days on which they would prefer to work.
-
Go to the application's landing page:
http://waiter-availability-webapp.herokuapp.com -
Log in or create an account.
-
If you don't have an account yet, create an account by clicking on the "Register" button. On the registration page, input your desired credentials. (For your manager's convenience, use your real name and surname as an account name)
-
If you do have an account, use your credentials to log in.
-
-
Check the boxes for the days on which you would prefer to work for the week.
-
Submit your choices by clicking on the submit button.
Managers can quickly see an overview of the week by accessing the '/admin' page. Days which are under-staffed will be coloured yellow, days that have an adequate amount of staff will be coloured green, and days for which too many waiters have subscribed will be coloured red.
Managers can use this data in order to assist them in making decisions that pertain to shift delegation.
-
Go to the application's landing page:
http://waiter-availability-webapp.herokuapp.com -
Log in or register an admin account.
-
Log in using the username "admin", along with the designated admin password.
-
If an admin account has not yet been created, click on the "Register" button in order to create an account. The account username must be "admin" in order to access the manager dashboard. The password can be anything.
-
-
View your waiters' shifts.
Want to contribute to and/or extend the application? Then this section's for you!
- Node & npm must be installed.
- MongoDB must be installed.
-
Fork the repository.
-
Clone the repository onto your dev machine.
-
Navigate to the project root directory.
-
Run
npm installin the project root. This will install all dependencies that are included in the package.json.Tools that are included in this app are:
- Mongoose
- ExpressJS
- Express Handlebars
- Express Static
- Body Parser
-
To run tests, you will need to install Mocha. This will allow you to run the
mochacommand in the terminal in order to run your unit tests. -
Run
npm install nodemonto install nodemon. This will allow you to run the express server by using the commandnodemonin your terminal while in the project's root.
The following steps will allow you to get your Mongo client shell running.
-
Install MongoDB.
-
Run the
mongodcommand in your terminal to start the Mongo DB process/service. -
Start the Mongo client. You can do this by running
mongoin the terminal. -
You can now interact with your databases using the Mongo shell.
One of the best ways to learn a new technology is to tinker with it. Now that your mongo shell is running, you'll be querying in no time!
-
Check your databases by running
show dbsin the Mongo shell. You should see the database that has been created by the Waiter Web App if you have run the server before. -
To use this project's database, you can run
use waiter_webapp -
You can now view any collections in the database. If you're from the SQL world, collections are kind of like tables. Not identical, but similar...
For the Waiter WebApp, you will notice that there are two collections - Available Shifts and Waiters.
-
Now that you know the collection names, you can start querying!
- Want to see all the waiter data? Run
db.waiters.find({}) - Want to remove all the waiter data? Run
db.waiters.remove({})
- Want to see all the waiter data? Run
-
You can read more information about Mongo queries here.
This project makes use of the continuous integration tool Travis CI.
In order for Travis to work, you need to make sure:
-
That
mochais a development dependency in yourpackage.json. If it isn't, add it by runningnpm install mocha --save-devin the terminal. -
That running
npm testexecutes your mocha tests. If it doesn't, add the following to yourpackage.json'sscriptsection:"scripts": { "test": "node_modules/.bin/mocha" }
Travis will automatically run all unit tests in this project. Here is how you set it up:
-
Sign up to Travis CI using your GitHub account.
-
Create a
.travis.ymlin your project root. This project already contains this file, so you won't need to create it. -
In your
.travis.yml, specify your "language" as "node_js", as well as your node version, as follows:language: node_js node_js: - "v4.2.6" -
Commit and push your code to GitHub.
-
Navigate to Travis CI, and sign in if necessary.
-
You should now be able to see the results of your unit tests by navigating to the desired repository.