From b7c2d94c6288c0d37fc317d4b8e078f7237951a5 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Sun, 30 Jul 2017 15:12:57 +0200 Subject: [PATCH] Fix Operation Row component. --- src/operations/operationRow.component.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/operations/operationRow.component.ts b/src/operations/operationRow.component.ts index e97e1f6..9afe471 100644 --- a/src/operations/operationRow.component.ts +++ b/src/operations/operationRow.component.ts @@ -17,7 +17,8 @@ import { OperationService } from './operation.service'; "[id]": "operation.id", "[class.stroke]": "operation.canceled", "[class.italic]": "!operation.confirmed", - "[class.warning]": "operation.balance < 0, danger: operation.balance < operationsCtrl.account.authorized_overdraft" + "[class.warning]": "operation.balance < 0", + "[class.danger]": "operation.balance < account.authorized_overdraft" }, template: ` {{ operation.operation_date | date:"yyyy-MM-dd" }} @@ -37,14 +38,14 @@ import { OperationService } from './operation.service';
@@ -70,7 +71,8 @@ import { OperationService } from './operation.service'; ` }) export class OperationRowComponent { - @Input() operation: Operation; + @Input('operation-row') operation: Operation; + @Input() account: Account; @Output() needsReload: EventEmitter = new EventEmitter(); constructor(