Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5a4c4ff
Added subtasks to the Task component
Claxtastic Apr 16, 2020
2849d3b
Added list and checkboxes to subtasks
Claxtastic Apr 16, 2020
56ea5b8
Fix subtask text capturing
Claxtastic Apr 16, 2020
0760b00
Added a date field to the tasks
Claxtastic Apr 17, 2020
3c9f597
Added due date to bottom right of tasks
Claxtastic Apr 19, 2020
f1e241b
#d81b60
Claxtastic Apr 19, 2020
cceb936
Lots of directory restructuring
Claxtastic Apr 20, 2020
4a46693
Added basic login and fixed BrowserRouter
Claxtastic Apr 20, 2020
3f86e44
Added SignUp component
Claxtastic Apr 27, 2020
7fd7557
Basic Spring API
Claxtastic May 22, 2020
ce9147b
Added subtasks array on API
Claxtastic May 22, 2020
d519da0
Changed the way Task creation works in React in anticipation for addi…
Claxtastic May 23, 2020
c4a8a27
Got a POST request working
Claxtastic May 23, 2020
11ad15a
Displaying tasks from database
Claxtastic May 23, 2020
967950d
Fixed GETting of subtasks
Claxtastic May 23, 2020
94d6025
Changed so tasks are POSTed to db before rendered
Claxtastic May 23, 2020
b09ca7c
Changed client structure so it isn't as nested
Claxtastic May 23, 2020
0d8bb9b
Merge pull request #5 from Claxtastic/spring
Claxtastic May 23, 2020
8b47521
Added logo to navbar
Claxtastic May 23, 2020
da5ec37
Changed navbar text to document.title
Claxtastic May 23, 2020
d61e297
Made the logo the favicon
Claxtastic May 23, 2020
d82423a
Changed package.json project name
Claxtastic May 23, 2020
49273c2
Created test folder for unit tests
Claxtastic May 24, 2020
51c68da
Added log statement for GET request
Claxtastic May 24, 2020
71fe9d8
Merge pull request #6 from Claxtastic/spring
Claxtastic May 24, 2020
599d31b
Changed tasks to be held in a grid
Claxtastic May 25, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .vscode/launch.json

This file was deleted.

13 changes: 0 additions & 13 deletions .vscode/tasks.json

This file was deleted.

File renamed without changes.
92 changes: 85 additions & 7 deletions package-lock.json → client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json → client/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"name": "team-6",
"name": "TaskBlaster",
"version": "0.1.0",
"private": true,
"dependencies": {
"@date-io/date-fns": "^1.3.13",
"@material-ui/core": "^4.9.9",
"@material-ui/icons": "^4.9.1",
"@material-ui/pickers": "^3.2.10",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"date-fns": "^2.12.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "^5.1.2",
Expand Down
Binary file added client/public/favicon.ico
Binary file not shown.
File renamed without changes.
Binary file added client/public/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/public/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions public/manifest.json → client/public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"short_name": "TaskBlaster",
"name": "TaskBlaster Project Management Tool",
"icons": [
{
"src": "favicon.ico",
Expand Down
File renamed without changes.
55 changes: 55 additions & 0 deletions client/src/api/TaskAPI.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import React from 'react';
import Task from '../components/Task';

const API_URL = 'http://localhost:8080';
const HEADERS = {
'Accept' : 'application/json',
'Content-Type' : 'application/json;charset=UTF-8'
};

class TaskAPI {

async getAllTasks(removeTask) {
const response = await fetch(`${API_URL}/tasks`);
console.log(`GET: ${response.status}`);
const responseJson = await response.json();

var taskComponents = [];
for (let [key, taskData] of Object.entries(responseJson)) {
taskComponents[key] =
<Task
key={taskData.id}
number={taskData.id}
removeTask={removeTask}
title={taskData.title}
subTasks={taskData.subTasks}
dueDate={taskData.dueDate}/>
}
return taskComponents;
}

// TODO: Add a username to the params
async postTask(taskJson) {
const postOptions = {
method: 'POST',
headers: HEADERS,
body: JSON.stringify(taskJson)
};
const response = await fetch(`${API_URL}/addtask`, postOptions);
console.log(`POST: ${response.status}`);
const responseJson = await response.json();
return responseJson;
}

async deleteTask(id) {
const deleteOptions = {
method: 'DELETE'
};
await fetch(`${API_URL}/delete/${id}`, deleteOptions)
.then(response => {
console.log(`DELETE: ${response.status}`);
});
}
}

export default new TaskAPI();
Loading