This application aims to create a to-do list, with Java back-end and HTML-JS front-end
function addNewTaskList(): This function creates a new task list for the logged in user. It takes "username" from local storage of browser, and task list "name" directly from user via prompt. Then it combines these two parameters in a form object and send an http request, while using this form object as body.
function getAllUsers(): This function returns all registered users and logs them in to the console. This function simply does a GET request.
function register(): This function takes parameters from "input" elements, and POST them to the web service.
function createTable(response): This function takes an "User" object, then builds few "select" elements (to choose task list to present or to filter tasks from task list) and also a table to present current tasks from selected task list. It also create a button to add new task to the selected task list.
It also handles the events, such as "click" event of "addTask" button, and "change" event of filtering "select" element.
function taskListDelete(): This function takes the selected task list, and deletes that.
function login(): This function handles the login process. It also creates a "select" element to choose which task list to show.
function logout(): This function handles the logout process. It clears the screen (table, buttons and select elements) and shows the first login screen.
function sortByProperty(property): This function sorts an array by given "property".
Class Task, Class TaskList Class User: These two classes defines the object properties.
ResponseEntity<ArrayList> getAllUsers(): This function simply returns all users.
User getUser(@PathVariable int id):This function returns a specific user. Works with id.
ResponseEntity login(String username, String password): This function takes a username and a password and checks if there is a corresponding user, according to these parameters.
ResponseEntity register(String username, String password): This function checks if the username available and then, if it is, it registers that user.
ResponseEntity addTaskList(String username, String name): This function adds new task list with given name, to the given "username".
ResponseEntity addTask(String username, String name, String description, String date, int id): This function creates a new task with given informations and add this task to given "username"s "id" numbered task list.
ResponseEntity deleteTaskList(String username, int id): This function deletes the task with the given "id" from given "username"s record.
ResponseEntity deleteTask(String username, String name, int id): This function deletes the task with given "name" from "id" numbered task list from "username" records.