6 Commits

Author SHA1 Message Date
Huffle
012fb2d397 Merge branch 'main' into AP-139
All checks were successful
Backend Build and Test / build (push) Successful in 3m49s
2025-06-26 09:08:44 +02:00
Huffle
4f3b491379 change url
Some checks failed
Backend Build and Test / build (push) Has been cancelled
2025-06-26 09:07:35 +02:00
Huffle
43a8447368 have 2 decimals for history values
Some checks failed
Backend Build and Test / build (push) Has been cancelled
2025-06-26 09:06:10 +02:00
Huffle
b8ffa6f894 Add recreate task button
All checks were successful
Backend Build and Test / build (push) Successful in 2m13s
2025-06-26 09:03:29 +02:00
Huffle
d6935d2f54 Update README.md (#140)
All checks were successful
Backend Build and Test / build (push) Successful in 3m58s
Backend Deploy / build (push) Successful in 22s
Add backend links

Reviewed-on: #140
2025-06-26 08:51:15 +02:00
06c8ebcbcc Add support for schedules (#137)
All checks were successful
Backend Build and Test / build (push) Successful in 3m42s
Backend Deploy / build (push) Successful in 4m46s
Reviewed-on: #137
2025-05-30 20:22:33 +02:00
5 changed files with 40 additions and 3 deletions

View File

@@ -14,3 +14,13 @@ In order to run the frontend, go to the `allowance-planner-v2` directory in the
```bash
$ ionic serve
```
## Backend links
In order to run the frontend, go to the `allowance-planner-v2` directory in the `frontend` directory and run:
```bash
Main: https://allowanceplanner.seeseepuff.be/api
```
```bash
Test: http://localhost:8080/api
```

View File

@@ -6,6 +6,7 @@
</div>
<ion-title *ngIf="isAddMode">Create Task</ion-title>
<ion-title *ngIf="!isAddMode">Edit Task</ion-title>
<button class="done-button" *ngIf="!isAddMode" (click)="completeAndRecreateTask()">Done & Re-create</button>
</div>
</ion-toolbar>
</ion-header>

View File

@@ -42,6 +42,13 @@ button {
margin-top: 100px;
}
.done-button {
width: 150px;
margin-top: unset;
margin-right: 20px;
border-radius: 10px;
}
button:disabled,
button[disabled]{
opacity: 0.5;

View File

@@ -57,13 +57,13 @@ export class EditTaskPage implements OnInit {
let assigned: number | null = Number(formValue.assigned);
if (assigned === 0) {
assigned = null;
}
};
const task = {
name: formValue.name,
reward: formValue.reward,
assigned
}
};
if (this.isAddMode) {
this.taskService.createTask(task);
@@ -79,6 +79,25 @@ export class EditTaskPage implements OnInit {
this.router.navigate(['/tabs/tasks']);
}
completeAndRecreateTask() {
const formValue = this.form.value;
let assigned: number | null = Number(formValue.assigned);
if (assigned === 0) {
assigned = null;
};
const task = {
name: formValue.name,
reward: formValue.reward,
assigned
};
this.taskService.createTask(task);
this.taskService.completeTask(this.id);
this.router.navigate(['/tabs/tasks']);
}
navigateBack() {
this.location.back();
}

View File

@@ -15,6 +15,6 @@
<div
class="amount"
[ngClass]="{ 'negative': history.allowance < 0 }"
>{{ history.allowance }} SP</div>
>{{ history.allowance.toFixed(2) }} SP</div>
</div>
</ion-content>