added updating transaction

This commit is contained in:
piratefinn 2018-03-20 16:53:29 +00:00
parent 49bd7d2e0c
commit 2188c1272f
7 changed files with 61 additions and 20 deletions

View file

@ -1,6 +1,6 @@
<td (click)="recurClick()">{{recur.seller}}</td>
<td (click)="recurClick()">{{categories[recur.category] || 'Uncategorised'}}</td>
<td (click)="recurClick()">{{recur.essential}}</td>
<td (click)="recurClick()">{{updatedDate}}</td>
<td (click)="recurClick()">{{recur.essential == 1 ? 'true' : 'false'}}</td>
<td (click)="recurClick()">{{recur.display_time}}</td>
<td (click)="recurClick()">{{recur.recurring_period}}</td>
<td (click)="recurClick()">{{recur.value}}</td>

View file

@ -10,6 +10,7 @@ interface RecurData {
seller: string;
start_time: string;
value: number;
display_time: any;
}
@Component({
@ -25,9 +26,9 @@ export class RecurResultComponent {
ngOnInit(): void {
if (this.recur.last_updated) {
this.updatedDate = moment(this.recur.last_updated).format('llll');
this.recur.display_time = moment(this.recur.last_updated).format('llll');
} else {
this.updatedDate = moment(this.recur.start_time).format('llll');
this.recur.display_time = moment(this.recur.start_time).format('llll');
}
}

View file

@ -5,7 +5,7 @@
<th>Seller</th>
<th>Category</th>
<th>Essential</th>
<th>Last Updated</th>
<th>Last Applied</th>
<th>Recurring Period</th>
<th>Value</th>
</tr>

View file

@ -10,6 +10,7 @@ interface RecurData {
seller: string;
start_time: string;
value: number;
display_time: any;
}
@Component({