Desk Booking Application

Intro

In the world of remote work, the most of employees have to work at home. However, when it's necessary for you to be present in an office on a specific day, book a hot desk using the application so that you can be sure no one occupies it.

Application features:
  • Flask and SQLAlchemy back-end.
  • Pure HTML and CSS layout.
  • JavaScript elements.
  • Dynamic html template content with Flask variables and database queries.
  • User form for selecting criterias.

Features

App includes following features:

  • Flask
  • CSS
  • HTML
  • JS
  • ORM

Demo

Application:
  • User can pick the date and floor - all desks for these criterias show up.
  • Desks already taken are displayed with gray.
  • Desks that can be pick up by user are displayed with black.
  • Once desk selected, it changes color to red.
  • System unables user to choose more than one desk or desk that is already occupied by someone else.
  • System confirms user's choice.
Database:
  • Database sotres all desk slots for a specific date and floor.
  • System sees which desks are occupied and which are free relying on the database 'occupied' column.
  • When user slecets a desks, systems updates the column 'occupied' to 'Y' for a desk.
  • System allows to book a desk one week ahead.
Workflow:
  1. User chooses his preference when it comes to floor and date when he attends the office.
  2. By clicking SEARCH, form sends POST request to the home endpoint.
  3. Home endpoint accepts POST request and instantiates 'choice' form so that it can fetch data from it objecitvely.
  4. Logic in the Home endpoint checks if data from the form was provded. If so, it queries the database due to what the form passes over.
  5. Fetched data is being passed to index.html template that desplays work stations for a chosen date and floor.
  6. User selects work station and second form on the bottom gets populated with its choice.
  7. Once BOOK clicked, form sends POST request to the home endpoint.
  8. Home endpoint accepts POST request and instantiates 'form' form so that it can fetch data from it objecitvely.
  9. Logic in the Home endpoint checks if data from the form was provded. If so, it queries the database due to what the form passes over.
  10. Update query updates the speicfied for date and floor work station in the database as occupied so that it will be unselectable during next selection.
  11. User gets redirected to confirmation page.

Setup

Python library installation required:
pip install flask
pip install flask-sqlalchemy
pip install flask-wtf

Source Code

You can view the source code: HERE