Integrated socketio.
Sockets run for both client and server. Created some functions (prototypes at the moment) in ticket_server.js for updating/making a new ticket, as well as a function for requesting and displaying information for a single ticket.

Database functions not yet implemented, nor is the md5 hash generator, so placeholders in the form of comments are where they should be.
Added 'title' to list of parameters for setting or displaying a ticket.
Added more functions with regards to getting a list of tickets (the different ways to filter based on options and keywords).
All the functions for setting and getting tickets, as well as setting and getting users have been put in place. Still missing database functions and some error handling.
Sessions have been integrated. At the moment it's very basic, but a user can log in and log out. Based on login status, certain things on a page will or will not display. e.g. The login form doesn't display if the user is logged in.

A temporary, test login form was created for this purpose.
First (non-tested) version of the sortTickets() function has been created.
Logging in now redirects to "/admin".

Added functions for setting and getting replies in ticket_server.js. sortTickets() is now commented out, because client-side should perform the sorting of tickets. Therefore the function should be moved over to the client-side.
Last commit before rebase. Added comments to reply functions.
Added comments to ticket_server.js reply functions. Also integrated sessions into the client-side, passed variables to client-side javascript.
Modified the functions in ticket_server.js to reflect new knowledge of database table columns (more columns than expected). Added functions to set and get departments for an administrator.

First commit after rebase.
Sockets run for both client and server. Created some functions (prototypes at the moment) in ticket_server.js for updating/making a new ticket, as well as a function for requesting and displaying information for a single ticket.

Database functions not yet implemented, nor is the md5 hash generator, so placeholders in the form of comments are where they should be.
Modified the error handling for searching/filtering tickets a little bit. User cannot search for tickets that are both complete and expired, because that is impossible by definition.

Integrated session variables and socket functionality into the angular js pages.
The home page checks the session role and the page loads different elements accordingly (for now, just basic welcome messages and different ticket lists).
Created functions on client-side to retrieve the proper tables of data for each ticket section, taking into account the current role/permission.

Also, using "getTickets" and "displayTickets" for all instances of ticket retrieval was causing problems. Using the same message for all cases resulted in data being received and displayed indiscriminately. Instead I've split getTickets() into numerous function calls, each with a different purpose and in turn, a different ingoing and outgoing message. e.g. getTicketsAdmin1 and displayTicketsAdmin1.
Implemented page restriction by role permission. Created a permissions.js that stores all the permissions for all roles, in terms of what pages they can visit. In admin.js, created a function that, for every route/state change, verifies if the user is able to access the page, otherwise they will be denied.

However, this is an incomplete non-working version thus far. The application verifies the permission, but under this scheme, the page/template will load before the application has a chance to redirect the user, which is bad design.
Page restriction is fully functional. Non-logged-in users cannot access /admin or any of its subpages, and will be brought back to the login form. Admin can access any page, whereas managers and IT users are more restricted. Again, the logic for all of this is in permissions.js.

If a user lacks the permission, they will be redirected to the "restrict" page instead, where an error message displays and a link button that takes them back one page.

Users who already are logged will always be taken to /admin when visiting the login form.

Also implemented a logout function, for convenience.
Last commit before rebase. Passed some test variables from jade into the angularjs state.
Re-implemented commits with non-angular version of application.
Re-implemented permission-checking and restriction from pages in terms of roles, and re-populated the overview page with tables. This time, everything is done in angularJS and almost nothing is handled by the standalone javascript/jqueries.

Also, created a service to retrieve and store the session variables in angularjs using an HTTP get. Now angularjs has constant access to the session variables for that particular user, which makes it much more convenient to perform role-based displaying/hiding/restrictions.