add history description
All checks were successful
Backend Build and Test / build (push) Successful in 2m9s
All checks were successful
Backend Build and Test / build (push) Successful in 2m9s
This commit is contained in:
parent
8380e95217
commit
c1fa92ea6c
BIN
backend/allowance_planner.db3.backup.3
Normal file
BIN
backend/allowance_planner.db3.backup.3
Normal file
Binary file not shown.
@ -1,4 +1,5 @@
|
|||||||
export interface History {
|
export interface History {
|
||||||
timestamp: string;
|
timestamp: string;
|
||||||
allowance: number;
|
allowance: number;
|
||||||
|
description: string;
|
||||||
}
|
}
|
@ -32,6 +32,7 @@ export class AllowancePage implements ViewWillEnter {
|
|||||||
getAllowance() {
|
getAllowance() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.allowanceService.getAllowanceList(this.id).subscribe(allowance => {
|
this.allowanceService.getAllowanceList(this.id).subscribe(allowance => {
|
||||||
|
console.log(allowance)
|
||||||
allowance[0].colour = '#9C4BE4';
|
allowance[0].colour = '#9C4BE4';
|
||||||
allowance[0].name = 'Main Allowance';
|
allowance[0].name = 'Main Allowance';
|
||||||
this.allowance$.next(allowance);
|
this.allowance$.next(allowance);
|
||||||
|
@ -10,11 +10,11 @@
|
|||||||
<div class="item" *ngFor="let history of history$ | async">
|
<div class="item" *ngFor="let history of history$ | async">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="date">{{ history.timestamp | date: 'yyyy-MM-dd' }}</div>
|
<div class="date">{{ history.timestamp | date: 'yyyy-MM-dd' }}</div>
|
||||||
<div class="description">Seba made an oopsie</div>
|
<div class="description">{{ history.description }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="amount"
|
class="amount"
|
||||||
[ngClass]="{ 'negative': history.allowance < 0 }"
|
[ngClass]="{ 'negative': history.allowance < 0 }"
|
||||||
>{{ history.allowance }}</div>
|
>{{ history.allowance }} SP</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
padding: 8px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.left {
|
||||||
|
width: 70%;
|
||||||
|
}
|
||||||
|
|
||||||
.date {
|
.date {
|
||||||
color: var(--line-color);
|
color: var(--line-color);
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ export class HistoryPage implements ViewWillEnter {
|
|||||||
getHistory() {
|
getHistory() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.historyService.getHistoryList(this.userId).subscribe(history => {
|
this.historyService.getHistoryList(this.userId).subscribe(history => {
|
||||||
|
console.log(history)
|
||||||
this.history$.next(history);
|
this.history$.next(history);
|
||||||
})
|
})
|
||||||
}, 20);
|
}, 20);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user