Skip to content
Snippets Groups Projects
Commit aa77785c authored by Mustafa Aldoori's avatar Mustafa Aldoori
Browse files

Final product

parent 8d5bcbe9
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1" /> -->
<title>Example Application</title>
<link rel="stylesheet" href="bootstrap.min.css" />
<link rel="stylesheet" href="Styling.css" />
......
......@@ -23,7 +23,7 @@ const history = createHashHistory();
class TaskCompleted extends Component {
tasks = [];
categorys = []
categorys = [];
onlyPressedOnce = false;
onlyPressedOncePrio = false;
onlyPressedOnceDeadline = false;
......@@ -37,10 +37,10 @@ class TaskCompleted extends Component {
Task-name <Icon.Alfa onClick={this.sortAlfa} />
</Column>
<Column>
Priority <Icon.Prio onClick={this.prioSort} />
Priority <Icon.Prio onClick={this.prioSort} />
</Column>
<Column>
Category <Icon.Prio style={{pointerEvents: 'none'}} onClick={this.sortCategory} />
Category <Icon.Prio style={{ pointerEvents: 'none' }} onClick={this.sortCategory} />
</Column>
<Column>Completed</Column>
<Column> </Column>
......@@ -48,29 +48,37 @@ class TaskCompleted extends Component {
<br />
{this.tasks.map((task) => (
<div key={task.id} className="taskdiv">
<Row key={task.id}>
<Column title="Task-name">
<NavLink className="catobject" to={'/completed/' + task.id}>
{task.name}
</NavLink>
</Column>
<Column style={{marginTop: '0.2rem'}}>{task.priority ? <Icon.Priority style={{pointerEvents: 'none'}} /> : <Icon.NoPriority style={{pointerEvents: 'none'}} />}</Column>
<Column style={{marginTop: '0.31rem'}} title="Category" >{this.categorys.map((cate) => (task.categoryId == cate.id ? cate.name : " "))}</Column>
<Column style={{marginTop: '0.31rem'}}>{task.Completedate}</Column>
<Column style={{marginTop: '0.3rem'}}>
<div
<Row key={task.id}>
<Column title="Task-name">
<NavLink className="catobject" to={'/completed/' + task.id}>
{task.name}
</NavLink>
</Column>
<Column style={{ marginTop: '0.2rem' }}>
{task.priority ? (
<Icon.Priority style={{ pointerEvents: 'none' }} />
) : (
<Icon.NoPriority style={{ pointerEvents: 'none' }} />
)}
</Column>
<Column style={{ marginTop: '0.31rem' }} title="Category">
{this.categorys.map((cate) => (task.categoryId == cate.id ? cate.name : ' '))}
</Column>
<Column style={{ marginTop: '0.31rem' }}>{task.Completedate}</Column>
<Column style={{ marginTop: '0.3rem' }}>
<div
alt="Task delete button"
title="Press to delete"
style={{ display: 'inline' }}
>
<Icon.Trash
onClick={() => {
this.delete(task);
}}
/>
</div>
</Column>
</Row>
<Icon.Trash
onClick={() => {
this.delete(task);
}}
/>
</div>
</Column>
</Row>
</div>
))}
</Card>
......@@ -83,9 +91,9 @@ class TaskCompleted extends Component {
.getTasks()
.then((tasks) => {
this.tasks = tasks;
categoryService.getCategorys().then((category)=>{
this.categorys = category
})
categoryService.getCategorys().then((category) => {
this.categorys = category;
});
})
.catch((error) => {
Alert.danger(error.message);
......@@ -205,4 +213,4 @@ class TaskCompleted extends Component {
}
}
export default TaskCompleted; // Exports this Componant to be used in index.js
export default TaskCompleted; // Exports this Componant to be used in index.js
......@@ -68,29 +68,33 @@ class TaskList extends Component {
</Column>
<Column>
{task.priority ? (
<Icon.Priority
onClick={() => {
// Changes the priority when the star icon is pressed
task.priority = 0;
this.prioSave(task);
}}
style={{ marginTop: '95%' }}
/>
<div title="Press to untoggle priority" alt="Task priority">
<Icon.Priority
onClick={() => {
// Changes the priority when the star icon is pressed
task.priority = 0;
this.prioSave(task);
}}
style={{ marginTop: '95%' }}
/>
</div>
) : (
<Icon.NoPriority
onClick={() => {
// Changes the priority when the star icon is pressed
task.priority = 1;
this.prioSave(task);
}}
style={{ marginTop: '95%' }}
/>
<div title="Press to toggle priority" alt="Task priority">
<Icon.NoPriority
onClick={() => {
// Changes the priority when the star icon is pressed
task.priority = 1;
this.prioSave(task);
}}
style={{ marginTop: '95%' }}
/>
</div>
)}
</Column>
<Column title="Category">
<div style={{ marginTop: '23%' }}>
{this.categorys.map((cate) => (task.categoryId == cate.id ? cate.name : ' '))}{' '}
{/*Addes which category each task belongs to */}
{/*Addes which category each task belongs to */}
</div>
</Column>
<Column>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment